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

GET all metadata records. Returns a paginated list of Metadata records.


## OpenAPI

````yaml GET /api/v1/metadata
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/metadata:
    get:
      summary: GET metadata instances
      operationId: get_metadata_instances
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            format: int32
          description: Page number. Defaults to 1. See Pagination for more details.
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            default: 50
            format: int32
          description: >-
            Number of requested paginated records. Defaults to 50. See
            Pagination for more details.
        - name: sort
          in: query
          required: false
          schema:
            type: object
            format: string
          description: >-
            Optional Mongo-style JSON sort clause, e.g., `sort={"created_at":
            true}` to sort by created_at (descending)
        - name: where
          in: query
          required: false
          schema:
            type: object
            format: string
          description: >-
            Optional Mongo-style JSON filter clause, e.g., `where={"$uri":
            {"$eq": "/api/v1/samples/0ee172af60e84f61"}}`
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/metadata'
components:
  schemas:
    metadata:
      type: object
      properties:
        $uri:
          type: string
          pattern: ^/api/v1/metadata\/[^/]+$
          example: /api/v1/metadata/a1b2c3d4e5f67890
        custom:
          type: object
          default: {}
          description: >-
            Arbitrary metadata is supported as part of a custom object. custom
            has two constraints: (1) it must have a depth of one (i.e., no
            nested records); and (2) only strings, numbers, boolean, and null
            values are supported as values. Example: `{"lab_tech": "Linus
            Pauling", "amplicon_scheme": "V3-V4"}`
        date_collected:
          type: string
          nullable: true
          format: date-time
          description: Timestamp for when the sample was collected.
        date_sequenced:
          type: string
          nullable: true
          format: date-time
          description: Timestamp for when the sample was sequenced.
        description:
          type: string
          nullable: true
        external_sample_id:
          type: string
          nullable: true
          maxLength: 60
          description: >-
            An arbitrary external sample ID, e.g., an ID in a LIMS. Up to 60
            characters.
          format: uuid
          example: a1b2c3d4e5f67890
        library_type:
          type: string
          nullable: true
          enum:
            - WGS
            - Targeted/16S
            - Other
            - null
          description: An enum with the sample library type.
        location_lat:
          type: number
          nullable: true
          minimum: -90
          maximum: 90
          description: >-
            The latitude `(-90.0-90.0)` of the sample location. By convention,
            we recommend using this for the location in which the physical
            specimen was collected.
        location_lon:
          type: number
          nullable: true
          minimum: -180
          maximum: 180
          description: The longitude `(-180.0-180.0)` of the sample location.
        location_string:
          type: string
          nullable: true
          maxLength: 255
        name:
          type: string
          nullable: true
          maxLength: 255
        platform:
          type: string
          nullable: true
          enum:
            - 454 sequencing
            - 454 GS FLX
            - 454 GS FLX Titanium
            - Illumina
            - Illumina Genome Analyzer II
            - Illumina HiSeq
            - Illumina HiSeq 1500
            - Illumina HiSeq 2000
            - Illumina HiSeq 2500
            - Illumina HiSeq 3000
            - Illumina HiSeq 4000
            - Illumina HiSeq X
            - Illumina iSeq 100
            - Illumina MiniSeq
            - Illumina MiSeq
            - Illumina NextSeq
            - Illumina NextSeq 500
            - Illumina NextSeq 550
            - Illumina NovaSeq
            - Illumina NovaSeq 5000
            - Illumina NovaSeq 6000
            - BGISEQ
            - BGISEQ 50
            - Element
            - Element AVITI
            - Ion
            - Ion S5
            - Ion S5 XL
            - Ion PGM
            - Ion Proton
            - Ion Torrent
            - Oxford Nanopore
            - Oxford Nanopore GridION X5
            - Oxford Nanopore MinION
            - Oxford Nanopore PromethION
            - PacBio
            - PacBio RS II
            - PacBio Sequel
            - PacBio Sequel II System
            - PacBio Revio
            - PacBio Onso
            - SOLiD
            - Solexa Genome Analyzer
            - Sanger
            - Other
            - null
          description: An enum with the name of the sequencing platform.
        sample:
          type: object
          description: The sample the metadata belongs to.
          properties:
            $ref: f875e7c5-15e3-48f7-a1f9-81aacfade720
        sample_type:
          type: string
          nullable: true
          enum:
            - Isolate
            - Metagenomic
            - Other
            - null
          description: An enum with the sample type.
        starred:
          type: boolean
          default: false
          description: >-
            Whether the sample has been starred by the user within the One Codex
            web application.
        updated_at:
          type: string
          format: date-time
          description: >-
            Timestamp for when the object was last updated, encoded as a [RFC
            3339](https://www.ietf.org/rfc/rfc3339.txt) timestamp.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````