Bulk export is a sequence of operations that allows you to programmatically export data from a CDD vault. Bulk export works via saved searches, which means you must first specify your search using the CDD’s web interface, save that search, and then use the ID number of that saved search in the API.
Bulk Export is a three step process. The first step specifies the search to use, the format of the output, and where to search. This step creates a new export object within CDD. The second step is a call to determine if the data is ready for export, and the third step is the call to actually download the data .
Step 1: Initiate an Export Request
This call will initiate the export. The search is applied to the specified projects and public data sets. Both the projects and data_sets parameters are optional; the default behavior is to search over all the available projects and none of the public data sets.
|search (required)||The numeric id of a saved search|
|format||The file format to generate; one of “csv”, “sdf”, or “xls”.
The default is “csv”.
|projects||The projects to search for data to be exported. The format is a list of numeric project ids separated by commas.
The default is to search all projects that the user has access to in the specified vault.
Use “projects=” to indicate that no projects should be searched (e.g. searching a public data set only)
|data_sets||The public data sets to search for data to be exported. The format is a list of numeric data set ids separated by commas.
The default is to not search any public data sets.
A JSON object with the following fields:
|status||The status of the export. Should be “new”.|
|id||The ID of the export task. You will need to supply this ID for the subsequent steps.|
curl -X POST -H X-CDD-Token:$TOKEN 'https://app.collaborativedrug.com/api/v1/vaults/23/exports.csv?search=264&projects=34888,45466'
Step 2: Check Export Status
Check on the status of your export task. Repeat this call until the status is “finished”
Format is same as in step 1, but status should be either “new”, “started”, or “finished”. If it is any other value, something has gone wrong with your export.
Step 3: Download Data
Once the file is ready (when its status in step 2 is “finished”), you can download the data through this URL:
File contents in whatever format was requested. If the export is not ready, the server will return HTTP status code 403 (Forbidden).
Molecule Name,CDD Number,Arginine kinase inhibition: RFU (rfu)