Collaborative Drug Discovery Files API

File attachments

Operations 3

POST /vaults/{vault_id}/files Attach a file to an object #
DELETE /vaults/{vault_id}/files/{file_id} Delete file #
GET /vaults/{vault_id}/files/{file_id} Retrieve a file #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/collaborative-drug-discovery:collaborative-drug-discovery-files-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

collaborative-drug-discovery-files-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    url: https://support.collaborativedrug.com/hc/en-us/requests/new
  description: 'Collaborative Drug Discovery provides an API (Application Programming

    Interface) that can be used for secure programmatic access to your vault

    data.'
  license:
    name: Proprietary
    url: https://support.collaborativedrug.com/hc/en-us/requests/new
  title: CDD Files API
  version: 1.0.0
servers:
- url: https://app.collaborativedrug.com/api/v1
security:
- ApiKeyAuth: []
tags:
- description: File attachments
  name: Files
paths:
  /vaults/{vault_id}/files:
    post:
      description: 'Attach a file to a record in the vault. The request must be sent as `multipart/form-data` (the file itself is the `file` part; the `resource_class` and `resource_id` fields identify the record to attach it to).


        Files can only be attached to the four resource classes listed under `resource_class`: `run`, `molecule`, `protocol`, and `eln_entry`. Readout rows are not directly attachable — there is no `readout_row` resource class. To associate a file with protocol readout data, attach it to the parent `run` (`resource_class: run`, `resource_id`: the run''s id) or to the `protocol`.'
      operationId: attachFile
      parameters:
      - in: path
        name: vault_id
        required: true
        schema:
          $ref: '#/components/schemas/vault_id'
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  description: Path to the file to be uploaded
                  format: binary
                  type: string
                resource_class:
                  description: Class of the resource to which the file is attached
                  enum:
                  - run
                  - molecule
                  - protocol
                  - eln_entry
                  type: string
                resource_id:
                  description: Unique identifier of the resource to which the file is attached
                  type: string
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  id:
                    description: Internal file ID
                    type: string
                  name:
                    description: Name of the file
                    type: string
                type: object
          description: File successfully attached
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_apikey'
          description: Missing or invalid API key
      summary: Attach a file to an object
      tags:
      - Files
  /vaults/{vault_id}/files/{file_id}:
    delete:
      description: Delete a file
      operationId: deleteFile
      parameters:
      - in: path
        name: vault_id
        required: true
        schema:
          $ref: '#/components/schemas/vault_id'
      - in: path
        name: file_id
        required: true
        schema:
          description: Numeric identifier of the file
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/file'
          description: The file
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_apikey'
          description: Missing or invalid API key
      summary: Delete file
      tags:
      - Files
    get:
      description: Return a single file with the content base64 encoded.
      operationId: getFile
      parameters:
      - in: path
        name: vault_id
        required: true
        schema:
          $ref: '#/components/schemas/vault_id'
      - in: path
        name: file_id
        required: true
        schema:
          description: Numeric identifier of the file
          type: integer
      responses:
        '200':
          description: Successful operation, output will depend on format selected when doing the query
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error_apikey'
          description: Missing or invalid API key
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    default: Couldn't find file with 'id'={file_id}
                type: object
          description: Couldn't find this file
      summary: Retrieve a file
      tags:
      - Files
components:
  schemas:
    file:
      properties:
        character_set:
          example: US-ASCII
          type: string
        class:
          example: uploaded file
          type: string
        contents:
          description: Base64 encoded contents of the file
          example: VGhpcyBpcyBhIGZpbGUK
          type: string
        id:
          example: 1069448031
          type: integer
        mime_type:
          properties:
            hash:
              example: -1147906696977776400
              type: integer
            string:
              example: text/plain
              type: string
            symbol:
              example: text
              type: string
            synonyms:
              items:
                type: string
              type: array
          type: object
        name:
          example: tmp.txt
          type: string
      type: object
    error_apikey:
      description: Whenever the given API key doesn't allow access to the given vault or the vault doesn't exist
      properties:
        code:
          default: 401
          type: integer
        error:
          default: key not authorized for access to this vault
          type: string
      type: object
    vault_id:
      description: Numeric identifier of the vault
      type: integer
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: X-CDD-Token
      type: apiKey