Updates
Update endpoints are available for each data type to retrieve a list of IDs that have been updated or deleted since a specified time. The time provided must be a UNIX timestamp.
Optional query string param: return_objects
Including this parameter with a value of true will return a list of full JSON objects for the records that have been updated instead of IDs.
The following endpoints are available:
GET <qbench-url>/qbench/api/v1/updates/customer/{timestamp}
GET <qbench-url>/qbench/api/v1/updates/contact/{timestamp}
GET <qbench-url>/qbench/api/v1/updates/order/{timestamp}
GET <qbench-url>/qbench/api/v1/updates/sample/{timestamp}
GET <qbench-url>/qbench/api/v1/updates/test/{timestamp}
GET <qbench-url>/qbench/api/v1/updates/assay/{timestamp}
Example request:
GET /qbench/api/v1/updates/customer/1506981147 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"deleted": [18,23],
"updated": [1,19]
}
Example request 2:
GET /qbench/api/v1/updates/customer/1506981147?return_objects=true HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response 2:
{
"deleted": [],
"updated": [
{
"fax": null,
"tags": [
"Example tag"
],
"comments": null,
"phone": null,
"address": null,
"id": 1,
"customer_name": "Example Customer"
},
{
"fax": null,
"tags": [],
"comments": null,
"phone": null,
"address": null,
"id": 3,
"customer_name": "Example Customer 2"
},
...
]
}
Comments
0 comments
Please sign in to leave a comment.