PrintDocs
POST <qbench-url>/qbench/api/v1/printdoc
Will generate a new Print Doc with the provided config ID and entity ID. Can be used to create a print doc for a batch, order, sample, or test. Returns the ID of the newly created Print Doc.
Example request:
POST /qbench/api/v1/printdoc?printdoc_config_id=10&order_id=100 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
“id”: 101
}
GET <qbench-url>/qbench/api/v1/printdoc/status/{printdoc_id}
Print Docs are sent to a queue to be rendered. This endpoint will retrieve a status of the Print Doc and whether it is rendered or not.
Example request:
GET /qbench/api/v1/printdoc/status/101 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
“status”: “SUCCESSFUL”
}
GET <qbench-url>/qbench/api/v1/printdoc/{printdoc_id}
Will retrieve a url to download the requested Print Doc. These URLs are valid for 3 seconds. These URLs should not be stored for future use as they are NOT a link for the permanent location of a report file.
Example request:
GET /qbench/api/v1/printdoc/101 HTTP/1.1
Authorization: Bearer 63ff42c5-49e6-42e2-bc3f-04fbfc22bbcb
Host: <qbench-url>
Example response:
{
"url": "https://qbench-example.s3.amazonaws.com/example/2/1/1.pdf
?AWSAccessKeyId=AKIAIWFDFGVC7FRBVA
&Expires=1499818984
&Signature=ySJa%2FhLDKmGjSbo5xC9Rah%2Bh1cc%3D"
}
Comments
0 comments
Please sign in to leave a comment.