Example 1
Your system starts processing data.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":0}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 2
Your system finishes processing with error due to inability to download the user's genetic data file from Sequencing.com.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 2}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 3
Your system encounters an unknown error during app job processing that causes the app to stop (ie the app is unable to continue processing the user's data).
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 1, "errorMessage":"Error or exception specification"}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 4
Your system has successfully finished processing (ie your app completes processing the user's data) and sends two base64 encoded PDF reports (without callback URL).
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "outputFilesContents": {"Result1":"base64encodedPDF","Result2":"base64encodedPDF"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 5
Your system successfully finished processing and sends both base64 encoded PDF and callback URL with token.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "callback": {"url":"https://www.somewhere.com/external/sequencing/callback?refid=cb02a3723424ff1b0be1d53fba5b6c2207a6017c"}, "outputFilesContents": {"Result1":"base64encodedPDF"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 6
Your system has successfully finished processing and sends one downloadable PDF report using results URL (without callback URL).
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "outputFiles": {"Result":"https://www.somewhere.com/0/1/223/result.pdf"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 7
Your system has successfully finished processing and sends two downloadable PDF reports using two results URLs (without callback URL).
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "outputFiles": {"Melanoma risk result":"https://www.somewhere.com/0/1/223/result1.pdf", "Vitamin D result":"https://www.somewhere.com/0/2/334/result2.pdf"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
where <sequencingAuthenticationToken> should present a token to access endpoint on Sequencing.com that is acquired during authentication without brackets (refer to Section 1.1.1 for more details).
Example 8
Your system has successfully finished processing and sends callback URL only (without providing PDF report).
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0}, "callback": {"url":"https://www.somewhere.com/external/sequencing/callback?refid=cb02a3723424ff1b0be1d53fba5b6c2207a6017c"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 9
Your system has successfully finished processing and sends the callback URL with dynamically generated username and password.
Sequencing.com will convey this Callback URL along with the username and password to the user and user will use this to login to your site to obtain access to app job results. This example applies only if a Callback URL is included while a Downloadable Copy of Results File URL is not included.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0}, "callback": {"url":"https://www.somewhere.com/external/sequencing/callback", "username": "5cpo07", "password": "x7hetra#3EBavah" }}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 10
Your system has successfully finished processing and sends both callback URL with token and pdf report using results URL.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "callback": {"url":"https://www.somewhere.com/external/sequencing/callback?refid=cb02a3723424ff1b0be1d53fba5b6c2207a6017c"}, "outputFiles": {"Result":"https://www.somewhere.com/0/1/223/result.pdf"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>
Example 11
Your system has successfully finished processing and sends callback URL with username and password and pdf report using results URL.
$ curl -XPOST -H "Content-Type: application/json" --data '{"sequencingJobId":123, "status":1, "completionStatus": 0, "callback": {"url":"https://www.somewhere.com/external/sequencing/callback", "username": "5cpo07", "password": "x7hetra#3EBavah"}, "outputFiles": {"Result":"https://www.somewhere.com/0/1/223/result.pdf"}}' https://api.sequencing.com/v1/TpUpdateExternalJob?apiKey=<sequencingAuthenticationToken>