> ## Documentation Index
> Fetch the complete documentation index at: https://docs.supaqr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a list of files



## OpenAPI

````yaml GET /files
openapi: 3.0.1
info:
  title: SupaQR
  description: ''
  version: 1.0.0
servers:
  - url: https://api.supaqr.com
    description: 正式环境
security:
  - bearer: []
tags: []
paths:
  /files:
    get:
      tags: []
      summary: Retrieve a list of files
      parameters:
        - name: ids
          in: query
          description: |-
            IDs of files to filter by.
            eg. ids=id1&ids=id2
          required: false
          schema:
            type: array
            items:
              type: string
        - name: search
          in: query
          description: The search term to filter the files by.
          required: false
          schema:
            type: string
            minLength: 1
            maxLength: 200
        - name: ext
          in: query
          description: The file extension indicating the format (e.g., "png", "pdf")
          required: false
          example: png
          schema:
            type: string
            minLength: 1
            maxLength: 20
        - name: sortBy
          in: query
          description: The field to sort the files by.
          required: false
          schema:
            type: string
            enum:
              - name
              - created_at
            default: created_at
        - name: sortOrder
          in: query
          description: The order to sort the files by.
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
        - name: page
          in: query
          description: The page number for pagination.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 1
            default: 1
        - name: pageSize
          in: query
          description: The number of files per page.
          required: false
          schema:
            type: integer
            format: int32
            default: 20
            minimum: 1
            maximum: 100
        - name: showArchived
          in: query
          description: Whether to include archived files in the response.
          required: false
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                    name:
                      type: string
                    size:
                      type: integer
                      format: int32
                    createdAt:
                      type: string
                      format: date-time
                  required:
                    - id
                    - name
                    - size
                    - createdAt
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - bad_request
                    default: bad_request
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - unauthorized
                    default: unauthorized
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - not_found
                    default: not_found
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '422':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - parameter_error
                    default: parameter_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '429':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - rate_limit_exceeded
                    default: rate_limit_exceeded
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
        '500':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  code:
                    type: string
                    enum:
                      - internal_server_error
                    default: internal_server_error
                    description: A short code indicating the error code returned.
                  message:
                    type: string
                    description: A human readable explanation of what went wrong.
                required:
                  - code
                  - message
          headers: {}
      deprecated: false
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````