API calls related to runs:
Retrieve
GET /api/v1/vaults/<vault_id>/runs/<id>
Retrieve a single run.
Examples
Retrieve a single run
curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/runs/753311875
Returns:
{
"id": 75331185,
"class": "run",
"created_at": "2016-12-22T22:20:46.000Z",
"modified_at": "2023-07-27T15:13:30.000Z",
"run_date": "2016-07-22",
"source_files": [
{
"id": 336231,
"name": "MyDRImport.zip"
}
],
"attached_files": [],
"project": {
"name": "Internal Data",
"id": 6134
},
"eln_entries": [],
"person": "Charles Weatherall",
"run_fields": {
"Person": "Charles Weatherall",
"CRO": "CRO ABC"
},
"plate_statistics": [
{
"plate": {
"id": 261043,
"name": "CW Plate 20161105"
},
"readout_definition": {
"id": 283514,
"name": "Raw Data"
},
"statistics": [
{
"name": "z_prime_factor",
"value": 0.6913198633901083
},
{
"name": "positive_control_mean",
"mean": 30.46875,
"standard_deviation": 11.64248165264855,
"count": 32
},
{
"name": "negative_control_mean",
"mean": 2936.5625,
"standard_deviation": 287.3753235977355,
"count": 32
}
]
}
]
}
Note: If the Run returned is a plate-based Run, this GET Runs API call does return information on the plate statistics (such as Z' Factor and control means).
Update
PUT /api/v1/vaults/<vault_id>/runs/id
Updates an existing Run.
This PUT Runs API call allows users to update the Run’s Project association and the Run_Date, Person, Place, and Conditions fields.
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/runs/1055309345
File data.json:
{
"project":"New Project",
"run_date":"2020-09-14",
"conditions":"New Condition",
"place":"New Lab",
"person":"New Person"
}
Returns:
{
"id": 1055309345,
"class": "run",
"created_at": "2013-03-19T18:35:02.000Z",
"modified_at": "2020-09-14T14:26:58.000Z",
"run_date": "2020-09-14",
"person": "New Person",
"place": "New Lab",
"conditions": "New Condition",
"source_files": [
{
"id": 66399,
"name": "DataToImport.csv"
}
],
"attached_files": [],
"project": {
"name": "New Project",
"id": 9812
}
}
Destroy
DELETE /api/v1/vaults/<vault_id>/runs/<id>
Delete a single run.
DELETE /api/v1/vaults/<vault_id>/runs?slurp=<slurp_id>
Delete runs associated with a single slurp.
Parameter:
slurp |
Specify the slurp_id of an import operation. All runs associated with the slurp will be deleted if the user has permissions for all runs. If not, no runs will be deleted. |
Examples
Delete a single run
curl -H "X-CDD-Token: $TOKEN" -X DELETE https://app.collaborativedrug.com/api/v1/vaults/489978881/runs/753311875
Returns:
{
"message": "Run with ID 753311875 has been destroyed"
}
Delete runs associated with a slurp
curl -H "X-CDD-Token: $TOKEN" -X DELETE https://app.collaborativedrug.com/api/v1/vaults/489978881/runs?slurp=75212865
{
"status": 204,
"message": "Runs destroyed"
}