Benchling Dropdowns API

Dropdowns are registry-wide enums. Use dropdowns to standardize on spelling and naming conventions, especially for important metadata like resistance markers.

Documentation

Specifications

Other Resources

OpenAPI Specification

benchling-dropdowns-api-openapi.yml Raw ↑
openapi: 3.0.1
info:
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  title: Benchling AA Sequences Dropdowns API
  version: 2.0.0
  description: 'AA Sequences are the working units of cells that make everything run (they help make structures, catalyze reactions and allow for signaling - a kind of internal cell communication). On Benchling, these are comprised of a string of amino acids and collections of other attributes, such as annotations.

    '
servers:
- url: /api/v2
security:
- oAuth: []
- basicApiKeyAuth: []
tags:
- description: Dropdowns are registry-wide enums. Use dropdowns to standardize on spelling and naming conventions, especially for important metadata like resistance markers.
  name: Dropdowns
paths:
  /dropdowns:
    get:
      description: List dropdowns
      operationId: listDropdowns
      parameters:
      - in: query
        name: nextToken
        schema:
          type: string
      - in: query
        name: pageSize
        schema:
          default: 50
          maximum: 100
          minimum: 0
          nullable: false
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DropdownSummariesPaginatedList'
          description: OK
          headers:
            Result-Count:
              description: The total number of dropdowns that match the given query
              schema:
                type: integer
            x-rate-limit-limit:
              description: The number of allowed requests in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-remaining:
              description: The number of calls remaining in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-reset:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
      summary: List dropdowns
      tags:
      - Dropdowns
    post:
      description: Create a dropdown
      operationId: createDropdown
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DropdownCreate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dropdown'
          description: Created
          headers:
            x-rate-limit-limit:
              description: The number of allowed requests in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-remaining:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-reset:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
      summary: Create a dropdown
      tags:
      - Dropdowns
  /dropdowns/{dropdown_id}:
    get:
      description: Get a dropdown
      operationId: getDropdown
      parameters:
      - in: path
        name: dropdown_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dropdown'
          description: OK
          headers:
            x-rate-limit-limit:
              description: The number of allowed requests in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-remaining:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-reset:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Get a dropdown
      tags:
      - Dropdowns
    patch:
      description: Update a dropdown
      operationId: updateDropdown
      parameters:
      - in: path
        name: dropdown_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DropdownUpdate'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dropdown'
          description: OK
          headers:
            x-rate-limit-limit:
              description: The number of allowed requests in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-remaining:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
            x-rate-limit-reset:
              description: The number of seconds remaining in the current rate-limit period
              schema:
                type: integer
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Update a dropdown
      tags:
      - Dropdowns
  /dropdowns/{dropdown_id}/options:archive:
    post:
      description: Archive options belonging to a dropdown
      operationId: archiveDropdownOptions
      parameters:
      - description: ID of the dropdown to archive options for.
        in: path
        name: dropdown_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DropdownOptionsArchive'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DropdownOptionsArchivalChange'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Archive dropdown options
      tags:
      - Dropdowns
  /dropdowns/{dropdown_id}/options:unarchive:
    post:
      description: Unarchive options belonging to a dropdown
      operationId: unarchiveDropdownOptions
      parameters:
      - description: ID of the dropdown to archive options for.
        in: path
        name: dropdown_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DropdownOptionsUnarchive'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DropdownOptionsArchivalChange'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
          description: Not Found
      summary: Unarchive dropdown options
      tags:
      - Dropdowns
components:
  schemas:
    DropdownOptionsArchive:
      additionalProperties: false
      properties:
        dropdownOptionIds:
          description: Array of dropdown option IDs
          items:
            type: string
          type: array
        reason:
          description: 'Reason that dropdown options are being archived.

            '
          enum:
          - Made in error
          - Retired
          - Other
          type: string
      type: object
    BadRequestError:
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/BaseError'
          - properties:
              type:
                enum:
                - invalid_request_error
                type: string
      type: object
    DropdownOption:
      properties:
        archiveRecord:
          allOf:
          - $ref: '#/components/schemas/ArchiveRecord'
          nullable: true
        id:
          type: string
        name:
          type: string
      type: object
    DropdownSummariesPaginatedList:
      properties:
        dropdowns:
          items:
            $ref: '#/components/schemas/DropdownSummary'
          type: array
        nextToken:
          type: string
      type: object
    NotFoundError:
      properties:
        error:
          allOf:
          - $ref: '#/components/schemas/BaseError'
          - properties:
              invalidId:
                type: string
              type:
                enum:
                - invalid_request_error
                type: string
      type: object
    ForbiddenError:
      properties:
        error:
          properties:
            invalidId:
              type: string
            message:
              type: string
            type:
              type: string
            userMessage:
              type: string
          type: object
      type: object
    DropdownOptionsUnarchive:
      additionalProperties: false
      properties:
        dropdownOptionIds:
          description: Array of dropdown option IDs
          items:
            type: string
          type: array
      type: object
    DropdownUpdate:
      additionalProperties: false
      properties:
        options:
          description: Options to set for the dropdown
          items:
            $ref: '#/components/schemas/DropdownOptionUpdate'
          type: array
      required:
      - options
      type: object
    DropdownOptionCreate:
      properties:
        name:
          type: string
      required:
      - name
      type: object
    Dropdown:
      allOf:
      - $ref: '#/components/schemas/DropdownSummary'
      - properties:
          archiveRecord:
            allOf:
            - $ref: '#/components/schemas/ArchiveRecord'
            nullable: true
          options:
            description: Array of dropdown options
            items:
              $ref: '#/components/schemas/DropdownOption'
            type: array
        type: object
      description: Dropdowns are registry-wide enums. Use dropdowns to standardize on spelling and naming conventions, especially for important metadata like resistance markers.
    BaseError:
      properties:
        message:
          type: string
        type:
          type: string
        userMessage:
          type: string
      type: object
    ArchiveRecord:
      properties:
        reason:
          example: Made in error
          type: string
      type: object
    DropdownOptionsArchivalChange:
      description: 'IDs of all items that were archived or unarchived.

        '
      properties:
        dropdownOptionIds:
          items:
            type: string
          type: array
      type: object
    DropdownSummary:
      properties:
        id:
          description: ID of the dropdown
          type: string
        name:
          description: Name of the dropdown
          type: string
      type: object
    DropdownCreate:
      additionalProperties: false
      properties:
        name:
          description: Name of the dropdown
          type: string
        options:
          description: Options to set for the dropdown
          items:
            $ref: '#/components/schemas/DropdownOptionCreate'
          type: array
        registryId:
          description: ID of registry in which to create the dropdown. Required if multiple registries exist.
          nullable: true
          pattern: ^src_\w+
          type: string
      required:
      - name
      - options
      type: object
    DropdownOptionUpdate:
      properties:
        id:
          description: ID of the dropdown option to update, omitted if creating a new option.
          example: sfs_9cGQIqS3
          pattern: ^sfs_\w+
          type: string
        name:
          description: Name of the dropdown option.
          type: string
      required:
      - name
      type: object
  securitySchemes:
    basicApiKeyAuth:
      description: Use issued API key for standard access to the API
      scheme: basic
      type: http
    basicClientIdSecretAuth:
      description: Auth used as part of client credentials OAuth flow prior to receiving a bearer token.
      scheme: basic
      type: http
    oAuth:
      description: OAuth2 Client Credentials flow intended for service access
      flows:
        clientCredentials:
          scopes: {}
          tokenUrl: /api/v2/token
      type: oauth2
externalDocs:
  description: Additional API Documentation
  url: https://docs.benchling.com