QMS Logs
POST <qbench-url>/qbench/api/v1/log/type/{log_type_id}/entry
Will create a new Log Entry. Returns the ID of the newly created Log Entry
Example Request:
POST /qbench/api/v1/log/type/32/entry HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"data": {
"ws_input_1": 12,
"ws_input_2": 8
}
}
Example Response:
{
"id": 4
}
PUT <qbench-url>/qbench/api/v1/log/type/{log_type_id}/entry/{log_entry_id}
Will update the target Log Entry
Example Request:
POST /qbench/api/v1/log/type/32/entry/4 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Content-Type: application/json
{
"data": {
"ws_input_1": 22,
"ws_input_2": 6
}
}
Example Response:
{
"message": "OK"
}
GET <qbench-url>/qbench/api/v1/source?page_num={pageNum}&page_size={pageSize}
Will retrieve a paginated list of Source. Maximum page size is 50.
Example Request:
GET /qbench/api/v1/source?page_num=1&page_size=50 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example Response:
{
"date_entered": "09/24/2021 02:54 PM",
"entered_by_api_client_id": null,
"id": 216,
"log_type": {
"active": true,
"data": null,
"description": null,
"id": 54,
"title": "Temperature Average",
"worksheet_id": 352
},
"log_type_id": 54,
"worksheet_data": {
"i1": {
"ws_input_1": 22,
"ws_input_1": 4,
"average": 13
}
},
"qba30": "ceefb23023db4"
}
Patch Worksheet Data
PATCH <qbench-url>/qbench/api/v1/log/type/{log_type_id}/entry/{log_entry_id}/worksheet
Will patch the worksheet data on the Log Entry referenced by the log_entry_id in the URL.
Example request:
PATCH /qbench/api/v1/log/type/123/entry/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.
Comments
0 comments
Please sign in to leave a comment.