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

# Retrieve All Documents

GET all Document instances. Returns a paginated list of Documents.


## OpenAPI

````yaml GET /api/v1/documents
openapi: 3.1.0
info:
  description: >-
    The One Codex API (v1) -- programmatic access to One Codex's suite of
    microbial genomics data storage, analysis, and query tools.
  title: One Codex API (v1)
  version: v1
servers:
  - url: https://app.onecodex.com
security:
  - apiKeyAuth: []
paths:
  /api/v1/documents:
    get:
      summary: GET documents instances
      operationId: get_documents_instances
      parameters:
        - description: Page number. Defaults to 1. See Pagination for more details.
          in: query
          name: page
          required: false
          schema:
            default: 1
            format: int32
            type: integer
        - description: >-
            Number of requested paginated records. Defaults to 50. See
            Pagination for more details.
          in: query
          name: per_page
          required: false
          schema:
            default: 50
            format: int32
            type: integer
        - description: >-
            Optional Mongo-style JSON sort clause, e.g., `sort={"created_at":
            true}` to sort by created_at (descending)
          in: query
          name: sort
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
        - description: >-
            Optional Mongo-style JSON filter clause, e.g., `where={"$uri":
            {"$eq": "/api/v1/samples/0ee172af60e84f61"}}`
          in: query
          name: where
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            default: null
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/documents'
                type: array
          description: OK
components:
  schemas:
    documents:
      properties:
        $uri:
          example: /api/v1/documents/0d77065796f8d173
          pattern: ^/api/v1/documents/[a-f0-9]{16}$
          readOnly: true
          title: $Uri
          type: string
        created_at:
          description: >-
            Timestamp for when the object was created on the One Codex platform,
            encoded as a [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt)
            timestamp.
          format: date-time
          title: Created At
          type: string
        downloaders:
          description: >-
            An (optionally empty) array of references to users that the document
            has been shared with. These users are able to download (but not
            modify) the document.
          items:
            properties:
              __DOLLAR_REF__:
                example: /api/v1/users/a1b2c3d4e5f67890
                format: uri
                pattern: ^/api/v1/users/[a-f0-9]{16}$
                type: string
            title: users
            type: object
          title: Downloaders
          type: array
        filename:
          description: The document filename (e.g., "report.pdf")
          title: Filename
          type: string
        size:
          anyOf:
            - minimum: 1
              type: integer
            - type: 'null'
          description: The size of the document in bytes.
          title: Size
        uploader:
          description: >-
            A reference to the user that uploaded and owns the document, e.g.,
            `{"$ref": "/api/v1/users/5891ee65711c4d5e"}`. Only owners can modify
            a document (with some exceptions in the case of organization
            accounts configured for multiple users - please [contact
            us](mailto:support@onecodex.com) if you'd like to discuss this use
            case).
          properties:
            __DOLLAR_REF__:
              example: /api/v1/users/a1b2c3d4e5f67890
              format: uri
              pattern: ^/api/v1/users/[a-f0-9]{16}$
              type: string
          title: users
          type: object
      required:
        - $uri
        - created_at
        - downloaders
        - filename
        - size
        - uploader
      title: documents
      type: object
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey

````