info:
  name: Filter by Status - Completed
  type: http
  seq: 2

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

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

  Retrieves all queue items that have been successfully processed.

  **Method:** GET

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

  **Authentication:** Required (Bearer token)

  **Query Parameters:**
  - `status` (string): Must be `completed`
  - `limit` (integer, optional): Max items to return (default: 50)
  - `offset` (integer, optional): Number of items to skip
  - `sort_by` (string, optional): Sort field - `created_at`, `completed_at`
  - `sort_order` (string, optional): `asc` or `desc` (default: `desc`)

  **Response:**
  - `items` (array): Completed queue items
    - `id` (string): Queue item UUID
    - `type` (string): Item type
    - `status` (string): `completed`
    - `created_at` (string): When item was queued
    - `completed_at` (string): When processing finished
    - `duration_ms` (integer): Processing time
    - `device_id` (string): Device that queued the item
    - `media_id` (string): Associated media item
    - `result` (object): Processing result details
  - `total` (integer): Total completed items
  - `page` (object): Pagination info

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

  **Retention Policy:**
  - Completed items retained for 30 days
  - Auto-purged after retention period
  - Can be exported before deletion
  - Statistics aggregated before purge

  **Use Cases:**
  - Audit sync history
  - Monitor system performance
  - Analyze processing times
  - Verify successful operations
  - Generate compliance reports
  - Track device activity patterns
