Information submitted through the support site is private but is not hosted within your secure CDD Vault. Please do not include sensitive intellectual property in your support requests.

Batch(es) [GET, POST, PUT]

API calls related to batch objects:

Retrieve

Create 

Update

Delete

 

Retrieve


GET /api/v1/vaults/<vault_id>/batches/<id>

Get a single batch.


GET /api/v1/vaults/<vault_id>/batches

Get a collection of batches. 


Query Parameters (all optional):

batches Comma separated list of ids
Cannot be used with other parameters
async Boolean
If true, do an asynchronous export (see Async Export)
Use for large data sets. This is recommended any time you want to download more than page_size results.
no_structures Boolean
If true, omit structure representations for a smaller and faster response.
Default: false
created_before Date (YYYY-MM-DD)
created_after Date (YYYY-MM-DD)
modified_before Date (YYYY-MM-DD)
modified_after Date (YYYY-MM-DD)
molecule_created_before Date (YYYY-MM-DD)
molecule_created_after Date (YYYY-MM-DD)
offset The index of the first object actually returned. Defaults to 0.
page_size The maximum number of objects to return in this call. Default is 50, maximum is 1000. If the response exceeds the page_size, we strongly recommend using the async option instead of downloading multiple chunks.
projects Comma-separated list of project ids
Defaults to all available projects
Limits scope of query
data_sets Comma-separated list of public dataset ids
Defaults to no data sets
Limits scope of query

 

Examples

curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/batches/136660530

Returns:

{
  "id": 136660530,
  "class": "batch",
  "owner": "Super User",
  "created_at": "2007-02-04",
  "modified_at": "2007-12-31",
  "projects": [
    {
      "name": "Super User Private Stuff",
      "id": 3870925
    }
  ],
  "molecule": {
    "id": 927454016,
    "class": "molecule",
    "name": "Taurine",
    "synonyms": [
      "Taurine"
    ],
    "projects": [
      {
        "name": "Super User Private Stuff",
        "id": 3870925
      }
    ],
    "collections": [
      {
        "name": "super user hits",
        "id": 90769562
      }
    ],
    "owner": "Super User",
    "created_at": "2010-11-17",
    "modified_at": "2010-11-17",
    "smiles": "NCCS(O)(=O)=O",
    "cxsmiles": "NCCS(O)(=O)=O",
    "inchi": "InChI=1S/C2H7NO3S/c3-1-2-7(4,5)6/h1-3H2,(H,4,5,6)",
    "inchi_key": "XOAAWQZATWQOTB-UHFFFAOYSA-N",
    "iupac_name": "2-aminoethane-1-sulfonic acid",
    "molfile": "taurine\n  Mrv1770 12111714362D      \n\n  7  6  0  0  0  0      999 V2000\n  0.1105   -2.0625  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  0.1105   -1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.0000  0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.8250  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1.6500   -0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  4  6  2  0  0  0  0\n  4  7  2  0  0  0  0\nM  END\n",
    "molecular_weight": 125.14,
    "log_p": -2.61469,
    "log_d": -2.61939,
    "log_s": 0.996488,
    "num_h_bond_donors": 2,
    "num_h_bond_acceptors": 4,
    "num_rule_of_5_violations": 0,
    "formula": "C2H7NO3S",
    "isotope_formula": "C2H7NO3S",
    "dot_disconnected_formula": "C2H7NO3S",
    "p_k_a": -1.49,
    "p_k_a_type": "Acidic",
    "exact_mass": 125.014664263,
    "heavy_atom_count": 7,
    "composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "isotope_composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "topological_polar_surface_area": 80.39,
    "num_rotatable_bonds": 2,
    "cns_mpo_score": 4.82803,
    "fsp3": 1
  }
}

 

curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/batches?created_before=2017-12-31

Returns:

{
  "count": 9,
  "offset": 0,
  "page_size": 50,
  "objects": [
    {
      "id": 57473786,
      "class": "batch",
      "owner": "Full-Access User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        }
      ],
      "molecule": {
        "id": 9,
        "class": "molecule",
        "name": "structureless",
        "synonyms": [
          "structureless"
        ],
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          }
        ],
        "collections": [
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01"
      }
    },
    {
      "id": 136660530,
      "class": "batch",
      "owner": "Super User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "Super User Private Stuff",
          "id": 3870925
        }
      ],
      "molecule": {
        "id": 927454016,
        "class": "molecule",
        "name": "Taurine",
        "synonyms": [
          "Taurine"
        ],
        "projects": [
          {
            "name": "Super User Private Stuff",
            "id": 3870925
          }
        ],
        "collections": [
          {
            "name": "super user hits",
            "id": 90769562
          }
        ],
        "owner": "Super User",
        "created_at": "2010-11-17",
        "modified_at": "2010-11-17",
        "smiles": "NCCS(O)(=O)=O",
        "cxsmiles": "NCCS(O)(=O)=O",
        "inchi": "InChI=1S/C2H7NO3S/c3-1-2-7(4,5)6/h1-3H2,(H,4,5,6)",
        "inchi_key": "XOAAWQZATWQOTB-UHFFFAOYSA-N",
        "iupac_name": "2-aminoethane-1-sulfonic acid",
        "molfile": "taurine\n  Mrv1770 12111714502D      \n\n  7  6  0  0  0  0      999 V2000\n  0.1105   -2.0625  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  0.1105   -1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.0000  0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.8250  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1.6500   -0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  4  6  2  0  0  0  0\n  4  7  2  0  0  0  0\nM  END\n",
        "molecular_weight": 125.14,
        "log_p": -2.61469,
        "log_d": -2.61939,
        "log_s": 0.996488,
        "num_h_bond_donors": 2,
        "num_h_bond_acceptors": 4,
        "num_rule_of_5_violations": 0,
        "formula": "C2H7NO3S",
        "isotope_formula": "C2H7NO3S",
        "dot_disconnected_formula": "C2H7NO3S",
        "p_k_a": -1.49,
        "p_k_a_type": "Acidic",
        "exact_mass": 125.014664263,
        "heavy_atom_count": 7,
        "composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
        "isotope_composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
        "topological_polar_surface_area": 80.39,
        "num_rotatable_bonds": 2,
        "cns_mpo_score": 4.82803,
        "fsp3": 1
      }
    },
    {
      "id": 145175681,
      "class": "batch",
      "owner": "Full-Access User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        }
      ],
      "molecule": {
        "id": 7,
        "class": "molecule",
        "name": "Miconazole",
        "synonyms": [
          "Miconazole"
        ],
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          }
        ],
        "collections": [
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01",
        "smiles": "ClC1=CC=C(COC(CN2C=CN=C2)C2=CC=C(Cl)C=C2Cl)C(Cl)=C1",
        "cxsmiles": "ClC1=CC=C(COC(CN2C=CN=C2)C2=CC=C(Cl)C=C2Cl)C(Cl)=C1 |c:10,12,20,25,t:1,3,15,17|",
        "inchi": "InChI=1S/C18H14Cl4N2O/c19-13-2-1-12(16(21)7-13)10-25-18(9-24-6-5-23-11-24)15-4-3-14(20)8-17(15)22/h1-8,11,18H,9-10H2",
        "inchi_key": "BYBLEWFAAKGYCD-UHFFFAOYSA-N",
        "iupac_name": "1-[2-(2,4-dichlorophenyl)-2-[(2,4-dichlorophenyl)methoxy]ethyl]-1H-imidazole",
        "molfile": "\n  Mrv1770 12111714502D      \n\n 25 27  0  0  0  0      999 V2000\n   -1.4289  0.8250  0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n   -0.7145  0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145  0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145   -0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -1.6500  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  2.1434   -2.0625  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.8579   -1.6500  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  3.5724   -2.0625  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  4.3260   -1.7269  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  4.8781   -2.3400  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  4.4656   -3.0545  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  3.6586   -2.8830  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.1434   -2.8875  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.8579   -3.3000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.8579   -4.1250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.1434   -4.5375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.1434   -5.3625  0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -4.1250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -3.3000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145   -2.8875  0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000   -1.6500  0.0000 Cl  0  0  0  0  0  0  0  0  0  0  0  0\n   -0.7145   -0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  2  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  2  0  0  0  0\n  5  6  1  0  0  0  0\n  6  7  1  0  0  0  0\n  7  8  1  0  0  0  0\n  8  9  1  0  0  0  0\n  9 10  1  0  0  0  0\n 10 11  1  0  0  0  0\n 11 12  2  0  0  0  0\n 12 13  1  0  0  0  0\n 13 14  2  0  0  0  0\n 10 14  1  0  0  0  0\n  8 15  1  0  0  0  0\n 15 16  2  0  0  0  0\n 16 17  1  0  0  0  0\n 17 18  2  0  0  0  0\n 18 19  1  0  0  0  0\n 18 20  1  0  0  0  0\n 20 21  2  0  0  0  0\n 15 21  1  0  0  0  0\n 21 22  1  0  0  0  0\n  5 23  1  0  0  0  0\n 23 24  1  0  0  0  0\n 23 25  2  0  0  0  0\n  2 25  1  0  0  0  0\nM  END\n",
        "molecular_weight": 416.12,
        "log_p": 5.95637,
        "log_d": 5.92051,
        "log_s": -6.08948,
        "num_h_bond_donors": 0,
        "num_h_bond_acceptors": 2,
        "num_rule_of_5_violations": 1,
        "formula": "C18H14Cl4N2O",
        "isotope_formula": "C18H14Cl4N2O",
        "dot_disconnected_formula": "C18H14Cl4N2O",
        "p_k_a": 6.48,
        "p_k_a_type": "Basic",
        "exact_mass": 413.9860239,
        "heavy_atom_count": 25,
        "composition": "C (51.96%), H (3.39%), Cl (34.08%), N (6.73%), O (3.84%)",
        "isotope_composition": "C (51.96%), H (3.39%), Cl (34.08%), N (6.73%), O (3.84%)",
        "topological_polar_surface_area": 27.05,
        "num_rotatable_bonds": 6,
        "cns_mpo_score": 2.95164,
        "fsp3": 0.166667
      }
    },
    {
      "id": 373670577,
      "class": "batch",
      "owner": "Super User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "Super User Private Stuff",
          "id": 3870925
        }
      ],
      "molecule": {
        "id": 971541720,
        "class": "molecule",
        "name": "Secret",
        "synonyms": [
          "Secret"
        ],
        "projects": [
          {
            "name": "Super User Private Stuff",
            "id": 3870925
          }
        ],
        "owner": "Super User",
        "created_at": "2010-11-17",
        "modified_at": "2010-11-17"
      }
    },
    {
      "id": 618771089,
      "class": "batch",
      "name": "KGB-51AD88",
      "owner": "Full-Access User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        }
      ],
      "molecule": {
        "id": 3,
        "class": "molecule",
        "name": "Cyanide",
        "synonyms": [
          "Cyanide"
        ],
        "cdd_registry_number": 3,
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          }
        ],
        "collections": [
          {
            "name": "super user hits",
            "id": 90769562
          },
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01",
        "smiles": "C#N",
        "cxsmiles": "C#N",
        "inchi": "InChI=1S/CHN/c1-2/h1H",
        "inchi_key": "LELOWRISYMNNSU-UHFFFAOYSA-N",
        "iupac_name": "formonitrile",
        "molfile": "\n  Mrv1770 12111714502D      \n\n  2  1  0  0  0  0      999 V2000\n  0.8250  0.0000  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  3  0  0  0  0\nM  END\n",
        "molecular_weight": 27.026,
        "log_p": -0.346198,
        "log_d": -0.339047,
        "log_s": 0.321662,
        "num_h_bond_donors": 0,
        "num_h_bond_acceptors": 1,
        "num_rule_of_5_violations": 0,
        "formula": "CHN",
        "isotope_formula": "CHN",
        "dot_disconnected_formula": "CHN",
        "p_k_a": 9.5,
        "p_k_a_type": "Acidic",
        "exact_mass": 27.010899036,
        "heavy_atom_count": 2,
        "composition": "C (44.44%), H (3.73%), N (51.83%)",
        "isotope_composition": "C (44.44%), H (3.73%), N (51.83%)",
        "topological_polar_surface_area": 23.79,
        "num_rotatable_bonds": 0,
        "cns_mpo_score": 5.1895,
        "fsp3": 0
      },
      "formula_weight": 27.026
    },
    {
      "id": 700861902,
      "class": "batch",
      "name": "Will's bottle of benzene",
      "owner": "Readadd User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        },
        {
          "name": "Super User Private Stuff",
          "id": 3870925
        }
      ],
      "molecule": {
        "id": 1,
        "class": "molecule",
        "name": "Benzene",
        "synonyms": [
          "Benzene",
          "benzene-002"
        ],
        "cdd_registry_number": 1,
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          },
          {
            "name": "Super User Private Stuff",
            "id": 3870925
          }
        ],
        "collections": [
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01",
        "smiles": "C1=CC=CC=C1",
        "cxsmiles": "C1=CC=CC=C1 |c:0,2,4|",
        "inchi": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H",
        "inchi_key": "UHOVQNZJYSORNB-UHFFFAOYSA-N",
        "iupac_name": "benzene",
        "molfile": "\n  Mrv1770 12111714502D      \n\n  6  6  0  0  0  0      999 V2000\n  0.7145  1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289  0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145   -0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  2  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  1  6  1  0  0  0  0\nM  END\n",
        "molecular_weight": 78.114,
        "log_p": 1.97325,
        "log_d": 1.97325,
        "log_s": -1.26596,
        "num_h_bond_donors": 0,
        "num_h_bond_acceptors": 0,
        "num_rule_of_5_violations": 0,
        "formula": "C6H6",
        "isotope_formula": "C6H6",
        "dot_disconnected_formula": "C6H6",
        "exact_mass": 78.0469501932,
        "heavy_atom_count": 6,
        "composition": "C (92.26%), H (7.74%)",
        "isotope_composition": "C (92.26%), H (7.74%)",
        "topological_polar_surface_area": 0,
        "num_rotatable_bonds": 0,
        "cns_mpo_score": 5,
        "fsp3": 0,
        "udfs": {
          "Color": "colorless",
          "Taste": "very bitter",
          "Smell": "sweet"
        }
      },
      "formula_weight": 78.114,
      "batch_fields": {
        "Date": "2006-01-01",
        "Person": "Will",
        "Place": "The kitchen",
        "Note": "50% water"
      }
    },
    {
      "id": 787637732,
      "class": "batch",
      "name": "Sigma-Aldrich #2451",
      "owner": "Full-Access User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        }
      ],
      "molecule": {
        "id": 2,
        "class": "molecule",
        "name": "Water",
        "synonyms": [
          "Water"
        ],
        "cdd_registry_number": 2,
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          }
        ],
        "collections": [
          {
            "name": "super user hits",
            "id": 90769562
          },
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01",
        "smiles": "O",
        "cxsmiles": "O",
        "inchi": "InChI=1S/H2O/h1H2",
        "inchi_key": "XLYOFNOQVPJJNP-UHFFFAOYSA-N",
        "iupac_name": "water",
        "molfile": "\n  Mrv1770 12111714502D      \n\n  1  0  0  0  0  0      999 V2000\n  0.0000  0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\nM  END\n",
        "molecular_weight": 18.015,
        "log_p": -0.652,
        "log_d": -0.652,
        "log_s": 0.530744,
        "num_h_bond_donors": 1,
        "num_h_bond_acceptors": 1,
        "num_rule_of_5_violations": 0,
        "formula": "H2O",
        "isotope_formula": "H2O",
        "dot_disconnected_formula": "H2O",
        "p_k_a": 15.7,
        "p_k_a_type": "Acidic",
        "exact_mass": 18.010564684,
        "heavy_atom_count": 1,
        "composition": "H (11.19%), O (88.81%)",
        "isotope_composition": "H (11.19%), O (88.81%)",
        "topological_polar_surface_area": 25.3,
        "num_rotatable_bonds": 0,
        "cns_mpo_score": 5.09833,
        "udfs": {
          "Literature Reference": "Aqueous et al. 2009",
          "Description": "water is the source of life"
        }
      },
      "formula_weight": 18.015,
      "batch_fields": {
        "Person": "Will",
        "Place": "The kitchen",
        "Date": "2007-02-04",
        "Note": "note taken"
      }
    },
    {
      "id": 812057525,
      "class": "batch",
      "owner": "Super User",
      "created_at": "2007-02-04",
      "modified_at": "2007-12-31",
      "projects": [
        {
          "name": "Super User Private Stuff",
          "id": 3870925
        }
      ],
      "molecule": {
        "id": 246113948,
        "class": "molecule",
        "name": "Glucose",
        "synonyms": [
          "Glucose"
        ],
        "projects": [
          {
            "name": "Super User Private Stuff",
            "id": 3870925
          }
        ],
        "collections": [
          {
            "name": "super user hits",
            "id": 90769562
          }
        ],
        "owner": "Super User",
        "created_at": "2010-11-17",
        "modified_at": "2010-11-17",
        "smiles": "OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O",
        "cxsmiles": "OC[C@H]1OC(O)[C@H](O)[C@@H](O)[C@@H]1O",
        "inchi": "InChI=1S/C6H12O6/c7-1-2-3(8)4(9)5(10)6(11)12-2/h2-11H,1H2/t2-,3-,4+,5-,6?/m1/s1",
        "inchi_key": "WQZGKKKJIJFFOK-GASJEMHNSA-N",
        "iupac_name": "(3R,4S,5S,6R)-6-(hydroxymethyl)oxane-2,3,4,5-tetrol",
        "molfile": "glucose\n  Mrv1770 12111714502D      \n\n 12 12  0  0  1  0      999 V2000\n  0.0000  2.4750  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145  2.0625  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145  1.2375  0.0000 C   0  0  1  0  0  0  0  0  0  0  0  0\n  1.4289  0.8250  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  2.1434   -0.4125  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145   -0.4125  0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0\n  0.7145   -1.2375  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 C   0  0  1  0  0  0  0  0  0  0  0  0\n   -0.7145   -0.4125  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.8250  0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0\n   -0.7145  1.2375  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  3  2  1  1  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  1  0  0  0  0\n  5  7  1  0  0  0  0\n  7  8  1  6  0  0  0\n  7  9  1  0  0  0  0\n  9 10  1  1  0  0  0\n  9 11  1  0  0  0  0\n  3 11  1  0  0  0  0\n 11 12  1  6  0  0  0\nM  END\n",
        "molecular_weight": 180.156,
        "log_p": -2.93254,
        "log_d": -2.93259,
        "log_s": 0.351011,
        "num_h_bond_donors": 5,
        "num_h_bond_acceptors": 6,
        "num_rule_of_5_violations": 0,
        "formula": "C6H12O6",
        "isotope_formula": "C6H12O6",
        "dot_disconnected_formula": "C6H12O6",
        "p_k_a": 11.3,
        "p_k_a_type": "Acidic",
        "exact_mass": 180.063388106,
        "heavy_atom_count": 12,
        "composition": "C (40%), H (6.71%), O (53.28%)",
        "isotope_composition": "C (40%), H (6.71%), O (53.28%)",
        "topological_polar_surface_area": 110.38,
        "num_rotatable_bonds": 1,
        "cns_mpo_score": 4.32067,
        "fsp3": 1
      }
    },
    {
      "id": 858251680,
      "class": "batch",
      "name": "Joey's bottle of benzene",
      "owner": "Full-Access User",
      "created_at": "2010-02-04",
      "modified_at": "2010-12-31",
      "projects": [
        {
          "name": "McKerrow Vault",
          "id": 938429932
        }
      ],
      "molecule": {
        "id": 1,
        "class": "molecule",
        "name": "Benzene",
        "synonyms": [
          "Benzene",
          "benzene-002"
        ],
        "cdd_registry_number": 1,
        "projects": [
          {
            "name": "McKerrow Vault",
            "id": 938429932
          },
          {
            "name": "Super User Private Stuff",
            "id": 3870925
          }
        ],
        "collections": [
          {
            "name": "all",
            "id": 557113845
          }
        ],
        "owner": "Full-Access User",
        "created_at": "1999-01-01",
        "modified_at": "1999-01-01",
        "smiles": "C1=CC=CC=C1",
        "cxsmiles": "C1=CC=CC=C1 |c:0,2,4|",
        "inchi": "InChI=1S/C6H6/c1-2-4-6-5-3-1/h1-6H",
        "inchi_key": "UHOVQNZJYSORNB-UHFFFAOYSA-N",
        "iupac_name": "benzene",
        "molfile": "\n  Mrv1770 12111714502D      \n\n  6  6  0  0  0  0      999 V2000\n  0.7145  1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289  0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1.4289   -0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.7145   -0.4125  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  2  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  2  0  0  0  0\n  4  5  1  0  0  0  0\n  5  6  2  0  0  0  0\n  1  6  1  0  0  0  0\nM  END\n",
        "molecular_weight": 78.114,
        "log_p": 1.97325,
        "log_d": 1.97325,
        "log_s": -1.26596,
        "num_h_bond_donors": 0,
        "num_h_bond_acceptors": 0,
        "num_rule_of_5_violations": 0,
        "formula": "C6H6",
        "isotope_formula": "C6H6",
        "dot_disconnected_formula": "C6H6",
        "exact_mass": 78.0469501932,
        "heavy_atom_count": 6,
        "composition": "C (92.26%), H (7.74%)",
        "isotope_composition": "C (92.26%), H (7.74%)",
        "topological_polar_surface_area": 0,
        "num_rotatable_bonds": 0,
        "cns_mpo_score": 5,
        "fsp3": 0,
        "udfs": {
          "Color": "colorless",
          "Taste": "very bitter",
          "Smell": "sweet"
        }
      },
      "formula_weight": 78.114,
      "batch_fields": {
        "Date": "2009-01-01",
        "Person": "Joey",
        "Note": "in between the Jack and the Grey Goose",
        "Place": "The bar"
      }
    }
  ]
}

  

Create

 

POST /api/v1/vaults/<vault_id>/batches

Creates a new batch.

 

The body of the POST must contain a JSON structure specifying the molecule attributes. The structure is roughly the same format as what is returned by a GET call but with some restrictions and additions.

 

The HTTP response contains the full JSON representation of the new batch (as would be returned from a GET).

 

Allowed JSON keys for batches:

class

Optional. If present, must be “batch”

molecule

See Create Molecule if creating a new molecule.  You can also append to an existing molecule.

Only one of the following unless creating a new molecule:

  • {"id": <number>}

  • {"name": <name>}

  • {"structure": <structure>}

  • {“smiles”: <smiles>}

  • {“cxsmiles”: <cxsmiles>}

  • {“iupac_name”: <iupac name>}

name

String

projects

An array of project ids and/or names

batch_fields

Each vault has its own settings on the minimum information required to create a new Batch (for a Vault Administrator, see Settings > Vault > Batch Fields, to change which Batch fields are required).

{<batch_field_name>: <batch_field_value>, ... }

salt_name

(Registration Vaults Only)

A two-letter code or Salt vendor string as listed in the All Available Salts table.  The salt is determined automatically when the salt is included in the molecular structure.

stoichiometry

(Registration Vaults Only)

{
  "core_count": <integer>,
  "salt_count": <integer>,
  "solvent_of_crystallization_count": <integer>
}

 

Note that in a registration vault, POST batch is the only way to create a new molecule, since the registration of a new molecule must be accompanied by a first batch. In this case, the JSON describing the batch will include a "molecule" field with detailed information on the new molecule.

Example

curl -H "X-CDD-Token: $TOKEN" -X POST -H "Content-Type: application/json" -d "@data.json" https://app.collaborativedrug.com/api/v1/vaults/489978881/batches

File data.json:

{
  "molecule": { "name": "Taurine" },
  "name": "tmp API batch",
  "projects": [938429932, "Super User Private Stuff"],
  "batch_fields": {
    "Date": "2017-01-01",
    "Person": "Colonel Mustard",
    "Place": "Foyer",
    "Note": "With a Candlestick"
  }
}

Returns:

{
  "id": 1043808269,
  "class": "batch",
  "name": "tmp API batch",
  "owner": "Super User",
  "created_at": "2017-12-11",
  "modified_at": "2017-12-11",
  "projects": [
    {
      "name": "McKerrow Vault",
      "id": 938429932
    },
    {
      "name": "Super User Private Stuff",
      "id": 3870925
    }
  ],
  "molecule": {
    "id": 927454016,
    "class": "molecule",
    "name": "Taurine",
    "synonyms": [
      "Taurine"
    ],
    "projects": [
      {
        "name": "McKerrow Vault",
        "id": 938429932
      },
      {
        "name": "Super User Private Stuff",
        "id": 3870925
      }
    ],
    "collections": [
      {
        "name": "super user hits",
        "id": 90769562
      }
    ],
    "owner": "Super User",
    "created_at": "2010-11-17",
    "modified_at": "2017-12-11",
    "smiles": "NCCS(O)(=O)=O",
    "cxsmiles": "NCCS(O)(=O)=O",
    "inchi": "InChI=1S/C2H7NO3S/c3-1-2-7(4,5)6/h1-3H2,(H,4,5,6)",
    "inchi_key": "XOAAWQZATWQOTB-UHFFFAOYSA-N",
    "iupac_name": "2-aminoethane-1-sulfonic acid",
    "molfile": "taurine\n  Mrv1770 12111716072D      \n\n  7  6  0  0  0  0      999 V2000\n  0.1105   -2.0625  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  0.1105   -1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.0000  0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.8250  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1.6500   -0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  4  6  2  0  0  0  0\n  4  7  2  0  0  0  0\nM  END\n",
    "molecular_weight": 125.14,
    "log_p": -2.61469,
    "log_d": -2.61939,
    "log_s": 0.996488,
    "num_h_bond_donors": 2,
    "num_h_bond_acceptors": 4,
    "num_rule_of_5_violations": 0,
    "formula": "C2H7NO3S",
    "isotope_formula": "C2H7NO3S",
    "dot_disconnected_formula": "C2H7NO3S",
    "p_k_a": -1.49,
    "p_k_a_type": "Acidic",
    "exact_mass": 125.014664263,
    "heavy_atom_count": 7,
    "composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "isotope_composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "topological_polar_surface_area": 80.39,
    "num_rotatable_bonds": 2,
    "cns_mpo_score": 4.82803,
    "fsp3": 1
  },
  "formula_weight": 125.14,
  "batch_fields": {
    "Date": "2017-01-01",
    "Person": "Colonel Mustard",
    "Place": "Foyer",
    "Note": "With a Candlestick"
  }
}

 

Update

 

PUT /api/v1/vaults/<vault_id>/batches/id

Update an existing batch.

 

See Create for valid fields.  Fields not specified in the JSON are not changed.

To delete a batch, simply submit with an empty projects array.

 

Note that the ID for the batch is specified as part of the URL, not in the JSON (the JSON can contain an ID field as long as its value matches the URL).

 

Examples

curl -H "X-CDD-Token: $TOKEN" -X PUT -H "Content-Type: application/json" -d "@data.json" https://app.collaborativedrug.com/api/v1/vaults/489978881/batches/1043808269

File data.json:

{
  "batch_fields": {
    "Person": "Mrs. Peacock"
  }
}

Returns:

{
  "id": 1043808269,
  "class": "batch",
  "name": "tmp API batch",
  "owner": "Super User",
  "created_at": "2017-12-11",
  "modified_at": "2017-12-11",
  "projects": [
    {
      "name": "McKerrow Vault",
      "id": 938429932
    },
    {
      "name": "Super User Private Stuff",
      "id": 3870925
    }
  ],
  "molecule": {
    "id": 927454016,
    "class": "molecule",
    "name": "Taurine",
    "synonyms": [
      "Taurine"
    ],
    "projects": [
      {
        "name": "McKerrow Vault",
        "id": 938429932
      },
      {
        "name": "Super User Private Stuff",
        "id": 3870925
      }
    ],
    "collections": [
      {
        "name": "super user hits",
        "id": 90769562
      }
    ],
    "owner": "Super User",
    "created_at": "2010-11-17",
    "modified_at": "2017-12-11",
    "smiles": "NCCS(O)(=O)=O",
    "cxsmiles": "NCCS(O)(=O)=O",
    "inchi": "InChI=1S/C2H7NO3S/c3-1-2-7(4,5)6/h1-3H2,(H,4,5,6)",
    "inchi_key": "XOAAWQZATWQOTB-UHFFFAOYSA-N",
    "iupac_name": "2-aminoethane-1-sulfonic acid",
    "molfile": "taurine\n  Mrv1770 12111716072D      \n\n  7  6  0  0  0  0      999 V2000\n  0.1105   -2.0625  0.0000 N   0  0  0  0  0  0  0  0  0  0  0  0\n  0.1105   -1.2375  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250   -0.8250  0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.0000  0.0000 S   0  0  0  0  0  0  0  0  0  0  0  0\n  0.8250  0.8250  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1.6500   -0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  0.0000  0.0000  0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0\n  1  2  1  0  0  0  0\n  2  3  1  0  0  0  0\n  3  4  1  0  0  0  0\n  4  5  1  0  0  0  0\n  4  6  2  0  0  0  0\n  4  7  2  0  0  0  0\nM  END\n",
    "molecular_weight": 125.14,
    "log_p": -2.61469,
    "log_d": -2.61939,
    "log_s": 0.996488,
    "num_h_bond_donors": 2,
    "num_h_bond_acceptors": 4,
    "num_rule_of_5_violations": 0,
    "formula": "C2H7NO3S",
    "isotope_formula": "C2H7NO3S",
    "dot_disconnected_formula": "C2H7NO3S",
    "p_k_a": -1.49,
    "p_k_a_type": "Acidic",
    "exact_mass": 125.014664263,
    "heavy_atom_count": 7,
    "composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "isotope_composition": "C (19.2%), H (5.64%), N (11.19%), O (38.35%), S (25.62%)",
    "topological_polar_surface_area": 80.39,
    "num_rotatable_bonds": 2,
    "cns_mpo_score": 4.82803,
    "fsp3": 1
  },
  "formula_weight": 125.14,
  "batch_fields": {
    "Date": "2017-01-01",
    "Person": "Mrs. Peacock",
    "Place": "Foyer",
    "Note": "With a Candlestick"
  }
}

  

curl -H "X-CDD-Token: $TOKEN" -X PUT -H "Content-Type: application/json" -d "@data.json" https://app.collaborativedrug.com/api/v1/vaults/489978881/batches/1043808269

File data.json:

{
  "projects": []
}

Returns:

{
"message": "Object has been removed from all projects, so it has been deleted"
}