> ## 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.

# Downloading Documents

Retrieves a Document stored at One Codex. First `POST` to the `download_uri` endpoint for the individual document. Then download the provided pre-signed `download_uri` link within the provided link expiration timeframe.

Note that this route is a `POST` because it may incur retrieval charges for large amounts of data and so should not be repeatedly retried. Care should also be taken in porting code using the `download_uri` route from a notebook environment on the One Codex platform to an external environment (where downloads may be unavailable depending on your platform account level).


## OpenAPI

````yaml POST /api/v1/documents/{id}/download_uri
openapi: 3.0.0
info:
  title: One Codex API (v1)
  description: >-
    The One Codex API (v1) -- programmatic access to One Codex's suite of
    microbial genomics data storage, analysis, and query tools.
  version: v1
servers:
  - url: https://app.onecodex.com
security:
  - apiKeyAuth: []
paths:
  /api/v1/documents/{id}/download_uri:
    post:
      summary: POST documents download_uri
      operationId: post_documents_download_uri
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_uri:
                    type: string
                    description: The presigned download URL.
                  expires_in_hours:
                    type: integer
                    description: The number of hours the download URL will be valid.
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````