One Codex Tags API

The Tags API from One Codex — 2 operation(s) for tags.

OpenAPI Specification

one-codex-tags-api-openapi.yml Raw ↑
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) Account Tags API
  version: v1
servers:
- url: https://app.onecodex.com
security:
- apiKeyAuth: []
tags:
- name: Tags
paths:
  /api/v1/tags:
    get:
      operationId: get_tags_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/tags'
                type: array
          description: OK
      summary: GET tags instances
      tags:
      - Tags
    post:
      operationId: post_tags_instances
      requestBody:
        content:
          application/json:
            schema:
              properties:
                name:
                  description: The tag label or name. Name must be 30 characters or fewer.
                  maxLength: 30
                  title: Name
                  type: string
                sample:
                  description: The sample to tag.
                  properties:
                    $ref:
                      example: /api/v1/samples/a1b2c3d4e5f67890
                      format: uri
                      pattern: ^/api/v1/samples/[a-f0-9]{16}$
                      type: string
                  type: object
              required:
              - name
              - sample
              title: TagCreateSchema
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/tags'
          description: OK
      summary: POST tags instances
      tags:
      - Tags
  /api/v1/tags/{id}:
    get:
      operationId: get_tags_self
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/tags'
                type: array
          description: OK
      summary: GET tags
      tags:
      - Tags
components:
  schemas:
    tags:
      properties:
        $uri:
          example: /api/v1/tags/0d77065796f8d173
          pattern: ^/api/v1/tags/[a-f0-9]{16}$
          readOnly: true
          title: $Uri
          type: string
        name:
          description: The tag label or name. Name must be 30 characters or fewer.
          maxLength: 30
          title: Name
          type: string
      required:
      - $uri
      - name
      title: tags
      type: object
  securitySchemes:
    apiKeyAuth:
      in: header
      name: X-API-Key
      type: apiKey