API calls related to Protocol data, including access to individual readout rows:
Index
GET /api/v1/vaults/<vault_id>/readout_rows
Returns (a subset of) the readout data for any number of protocols.
Query Parameters (all optional):
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. |
Note: any page_size parameter used in an API GET call that also uses the async=true parameter will be ignored. The GET call will return all valid data for the given GET call. |
only_ids |
Boolean If true, only the Readout Row IDs are returned, allowing for a smaller and faster response. Default: false |
It can be added to any GET Readout_Rows call. Async should still be used when many IDs are expected.
Note: any |
created_before |
Date (YYYY-MM-DDThh:mm:ss±hh:mm) | |
created_after |
Date (YYYY-MM-DDThh:mm:ss±hh:mm) | |
modified_before |
Date (YYYY-MM-DDThh:mm:ss±hh:mm) | |
modified_after |
Date (YYYY-MM-DDThh:mm:ss±hh:mm) | |
protocols |
Comma-separated list of protocol ids | Include only data for the specified protocols. (Now Optional) |
plates |
Comma-separated list of plate ids | Include only data for the specified plates |
molecules |
Comma-separated list of molecule ids | Include only data for the specified molecules |
batches |
Comma-separated list of batch ids | Include only data for the specified batches |
runs_before |
Date (YYYY-MM-DD) | Include only data for runs on or before the date (note: the full timestamp syntax should not be used with this parameter) |
runs_after |
Date (YYYY-MM-DD) | Include only data for runs on or after the date (note: the full timestamp syntax should not be used with this parameter) |
runs |
Comma-separated list of run ids for the given protocol | Include only data for runs listed |
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. Note: any page_size parameter used in an API GET call that also uses the async=true parameter will be ignored. The GET call will return all valid data for the given GET call. |
type |
detail_row batch_run_aggregate_row batch_protocol_aggregate_row molecule_protocol_aggregate_row |
Defaults to all. Can supply any number of readout row types the endpoint should return. Any aggregate rows will also include their protocol conditions in their readouts. |
include_control_state |
Boolean If true, control wells on plates are identified as positive or negative control wells |
Values returned are: "control_state": "#" |
data_sets |
Comma-separated list of public dataset ids Defaults to no data sets Limits scope of query |
Example
To retrieve from protocol with ID 537677966 the data from plate ID 1, use:
curl -H "X-CDD-Token: $TOKEN" https://app.collaborativedrug.com/api/v1/vaults/489978881/readout_rows?protocols=537677966&plates=1&type=detail_row
Returns:
{
"count": 7,
"offset": 0,
"page_size": 50,
"objects": [
{
"id": 1,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol": 537677966,
"molecule": 1,
"batch": 700861902,
"run": 1,
"well":
{
"row": 0,
"col": 0,
"plate": 1,
"batch": 700861902
},
"readouts":
{
"1": 86.7,
"3": 10.0
}
},
{
"id": 2,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 2,
"batch": 787637732,
"run": 2,
"well":
{
"row": 0,
"col": 1,
"plate": 1,
"batch": 787637732
},
"readouts":
{
"1": 133.7,
"2": "insoluble",
"3": 1.0
}
},
{
"id": 3,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 3,
"batch": 618771089,
"run": 2,
"well":
{
"row": 0,
"col": 2,
"plate": 1,
"batch": 618771089
},
"readouts":
{
"1": 123.4,
"2": "amalgam turned bold red"
}
},
{
"id": 4,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 1,
"batch": 700861902,
"run": 2,
"well":
{
"row": 0,
"col": 3,
"plate": 1,
"batch": 700861902
},
"readouts":
{
"1": 1234.0
}
},
{
"id": 5,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 1,
"batch": 700861902,
"run": 2,
"well":
{
"row": 0,
"col": 10,
"plate": 1,
"batch": 700861902
},
"readouts":
{
"1": 18000.0
}
},
{
"id": 6,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 2,
"batch": 787637732,
"run": 2,
"well":
{
"row": 1,
"col": 1,
"plate": 1,
"batch": 787637732
},
"readouts":
{
"1": 114.0
}
},
{
"id": 7,
"class": "readout row",
"created_at": "2022-12-20T00:18:27.000Z",
"modified_at": "2022-12-20T00:18:27.000Z",
"type": "detail_row",
"protocol":537677966,
"molecule": 1,
"batch": 858251680,
"run": 2,
"well":
{
"row": 1,
"col": 10,
"plate": 1,
"batch": 858251680
},
"readouts":
{
"1": 19340.0,
"3": 10.0
}
} ]
}
Update
PUT /api/v1/vaults/<vault_id>/readout_rows/<readout_row_id>
Updates an existing readout row (including the ability to flag an existing readout row as an outlier).
This PUT Readout_Rows API call allows users to update a specified row of Protocol data, delete a specified row of Protocol data, or flag a specified row of Protocol data as an outlier.
Noteworthy tips:
- The GET Protocol Data API call will be useful to ascertain the id of the readout row for the Protocol data you wish to edit.
- The GET Protocols API call also provides the readout definition IDs.
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/readout_rows/1122334455
File data.json used to edit a row of Protocol data:
{
"readouts": {
"283130": {"value": ">99"},
"283131": {"value": 77}}
}
File data.json used to flag a readout value as an outlier:
{
"readouts":
{"640916": {"outlier": true}}
}
File data.json used to set a readout value to null:
{
"readouts": {
"283130": {"value": ">99"},
"283131": {"value": null}}
}
Destroy
DELETE /api/v1/vaults/<vault_id>/readout_rows/<readout_row_id>
Delete a row of Protocol data.
Examples
Delete a row of Protocol data
curl -H "X-CDD-Token: $TOKEN" -X DELETE https://app.collaborativedrug.com/api/v1/vaults/489978881/readout_rows/753311875
Returns:
{"message": "Readout row with ID 753311875 has been destroyed"}