info:
  name: Filter by Status - Failed
  type: http
  seq: 1

http:
  method: GET
  url: '{{base_url}}/api/queue/items?status=failed'
  auth: inherit

docs: |-
  ## Filter Queue Items by Failed Status

  Retrieves all queue items that have failed to process.

  **Method:** GET

  **Endpoint:** /api/queue/items?status=failed

  **Authentication:** Required (Bearer token)

  **Query Parameters:**
  - `status` (string): Must be `failed`
  - `limit` (integer, optional): Max items to return (default: 50)
  - `offset` (integer, optional): Number of items to skip (for pagination)

  **Response:**
  - `items` (array): Failed queue items
    - `id` (string): Queue item UUID
    - `type` (string): Item type - `progress`, `note`, `highlight`, `bookmark`
    - `status` (string): `failed`
    - `error_message` (string): Error details
    - `error_code` (string): Error classification
    - `retry_count` (integer): Number of retry attempts
    - `max_retries` (integer): Maximum allowed retries
    - `created_at` (string): When item was queued
    - `failed_at` (string): When the item failed
    - `device_id` (string): Device that queued the item
    - `media_id` (string): Associated media item
  - `total` (integer): Total failed items
  - `page` (object): Pagination info

  **Status Codes:**
  - 200: Success
  - 401: Unauthorized

  **Common Failure Reasons:**
  - Network timeout during sync
  - Device offline during processing
  - Invalid data format
  - Database constraint violations
  - External service unavailability

  **Use Cases:**
  - Monitor sync failures
  - Identify problematic devices
  - Debug integration issues
  - Track error patterns
  - Determine items needing manual retry
