Batches
GET <qbench-url>/qbench/api/v1/batch/{batch_id}
Will retrieve a batch by its ID.
Example request:
GET <qbench-url>/qbench/api/v1/batch/1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"assay_id": 10,
"batch_complete": false,
"batch_equipment_ids": [],
"batch_equipment_usage_ids": [],
"batch_ids": [],
"batch_inventory_stock_usage_ids": [],
"batch_processed": false,
"batch_protocol_steps": null,
"batch_status": "NOT STARTED",
"date_created": "04/20/2023",
"display_name": "Some batch title",
"id": 1,
"last_updated": "1683920116",
"protocol": null,
"sample_ids": [],
"tags": [],
"tech": {},
"test_ids": [],
"worksheet_id": 5,
"worksheet_json": {}
}
Optional query string params:
- include_raw_worsksheet_data:
- Will return the value of each spreadsheet worksheet cell by cell location as opposed to just the named cell configurations. Must be set to "true".
GET <qbench-url>/qbench/api/v1/batch
Example request:
GET <qbench-url>/qbench/api/v1/batch
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"total_pages": 5,
"total_count": null,
"data": [
{
"id": 266,
"display_name": null,
"tags": [],
"date_created": "10/21/2019",
"sample_ids": [1493],
"test_ids": [4500],
"worksheet_id": 25,
"worksheet_json": null,
"do_not_hide": false,
"note_keeping": null,
"lot_verification_batch": false,
"last_updated": "1571679025"
},
...
]
}
POST <qbench-url>/qbench/api/v1/batch/{batch_id}
Example request
GET <qbench-url>/qbench/api/v1/batch/1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
{
“"display_name": Some new Display Name
}
Example response:
{'message': 'OK'}
DELETE <qbench-url>/qbench/api/v1/batch/{batch_id}
Will delete a batch.
Example request:
DELETE /qbench/api/v1/batch/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{"message":"OK"}
GET <qbench-url>/qbench/api/v1/batch/platemap/{batch_id}
Will retrieve the plate map configuration for a batch. NOTE: Will only show coordinates that contain a Sample or Inventory Stock.
Example request:
GET /qbench/api/v1/batch/platemap/1 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"A1": {
"id": 1,
"type": "sample"
},
"A2": {
"id": 1,
"type": "inventory_stock"
},
"C3": {
"id": 2,
"type": "inventory_stock"
},
"E5": {
"id": 2,
"type": "sample"
},
"F6": {
"id": 3,
"type": "sample"
},
}
Patch Worksheet Data
PATCH <qbench-url>/qbench/api/v1/batch/{batch_id}/worksheet
Will patch the worksheet data on the Batch referenced by the test_id in the URL.
Example request:
PATCH /qbench/api/v1/batch/1/worksheet HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"data": {
"input_1": "Updated Value",
"input_2": "Another Updated Value"
}
}
Example response:
{"message":"OK"}
If your worksheet requires a reason for updating, the reason can be included in the payload like so:
{
"data": {
"input_1": "Updated Value",
"input_2": "Another Updated Value"
},
"qbench_update_reason": "These values need to be updated!"
}
Notes
- If you are updating a Spreadsheet Worksheet type, you can use the named cell value instead of the Cell name if a named cell has been defined.
Add Tests to a Batch
POST <qbench-url>/qbench/api/v1/batch/{batch_id}/tests
Will add tests to a batch by using their IDs.
Example request
POST <qbench-url>/qbench/api/v1/batch/1/tests
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
{
"test_ids": [1, 2, 3]
}
Example response:
{'message': 'OK'}
Add Samples to a Batch
POST <qbench-url>/qbench/api/v1/batch/{batch_id}/samples
Example request
Will add samples to a batch by using their IDs.
POST <qbench-url>/qbench/api/v1/batch/1/samples
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
{
"sample_ids": [1, 2, 3]
}
Example response:
{'message': 'OK'}
Comments
0 comments
Please sign in to leave a comment.