info:
  name: List Saved Filters
  type: http
  seq: 1
http:
  method: GET
  url: '{{base_url}}/api/saved-filters?resource_type=media-items'
  auth: inherit

docs: |-
  ## List Saved Filters

  Retrieves all saved filters for the authenticated user and a specific resource type.

  **Method:** GET

  **Endpoint:** /api/saved-filters

  **Authentication:** Required (Bearer token)

  **Query Parameters:**
  - `resource_type` (string, required): Filter by resource type
    - Examples: "media-items", "collections", "devices"
    - Required parameter - must be provided

  **Response:**
  Array of saved filter objects:
  ```json
  [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "My Sci-Fi Books",
      "resource_type": "media-items",
      "filters": {
        "genre_filter": "Science Fiction",
        "sort": "title ASC"
      },
      "created_at": "2024-03-20T12:00:00Z",
      "updated_at": "2024-03-20T12:00:00Z"
    }
  ]
  ```

  **Status Codes:**
  - 200: Success - Returns array of saved filters
  - 400: Bad Request - Missing resource_type parameter
  - 401: Unauthorized - Invalid or missing authentication token

  **Example Usage:**
  ```bash
  # Get all saved filters for media items
  curl -H "Authorization: Bearer YOUR_TOKEN" \
    "{{base_url}}/api/saved-filters?resource_type=media-items"

  # Get all saved filters for collections
  curl -H "Authorization: Bearer YOUR_TOKEN" \
    "{{base_url}}/api/saved-filters?resource_type=collections"
  ```

  **Notes:**
  - Filters are specific to each user (user-scoped via JWT)
  - Returns empty array [] if no filters exist for the resource type
  - Results ordered by created_at DESC (newest first)
