For a deeper look into our DataScope Select REST API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1.1k 5 3 5

Why does my Datascope Select REST API synchronous request still return a 202?

The REST API Help Site claims "The API defaults to synchronous responses per the OData specification, ...", but when I have long running synchronous request (one where I deliberately do not provide a "Prefer: respond-async" header) I still get back a 202 continuation reply after 30 seconds.

dss-rest-apidatascope-selectdssrest-apiasynchronoussynchronous
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

· Write an Answer
Upvotes
Accepted
1.1k 5 3 5

This has been found to be a bug in Datascope Select REST API 10.7. When there is no "respond-async" Prefer option set, DSS is incorrectly using async in contradiction to the plan expectation correctly noted on the REST API Help Site.

Once this bug is fixed, it should be noted that not providing a "Prefer" header at all is expected to default to synchronous response and a 30 second timeout. Since 30 seconds is not likely to be adequate for a wide variety of extractions, it is recommend that you always specify some "wait=xxx" Prefer value for synchronous operations (less than 25 minutes as the Help Site notes). That is, this bug is not preventing a caller that leaves off this header entirely from getting good long-running results. Once this bug is fixed, the call will completely fail at 30 seconds instead of what it does now, which is respond with a 202.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This is a very interesting point. We have enhanced the FAQ following your query, to include detailed explanations on this topic. We hope you find this useful. The FAQ is available under the Documentation Tab (under the Troubleshooting header).

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.