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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
43 1 2 8

DSS ScheduleExtractNow HTTP status 202 Accepted

On POSTs to the /Extractions/Schedules({id})/DataScope.Select.Api.Extractions.ScheduleExtractNow API (doc), I usually get an HTTP 200 response code, but sometimes I get HTTP 202 with empty content. What does the 202 mean in this case?

The status code docs say it means an asyc operation is not yet complete. What is the async operation that is not yet completed here? I know the extraction is async, but I still expect a 200 (or a failure code) from the scheduling of the extraction.

dss-rest-api
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

Upvotes
Accepted
31.6k 37 11 19

Hello @aschmied,

Datascope Async processing paradigm allows to process all requests, including long-running.

A valid request should result in status code=200 if it is processed in a very short period of time.

If processing is taking longer, the response is 202=accepted, and consequently, the application should check the status via ExtractionID periodically (recommended is currently 30 secs), until the status becomes 200, completed.

The extraction result is, at that point, ready to be retrieved by Extraction ID.

I like this tutorial's brief step-by-step explanation of the required asynchronous processing, including status=200 and status=202:

REST API Tutorial 3: On Demand data extraction workflow

Please also refer to Key Mechanisms -> Async for the complete details of the implementation.

Hope that this information helps

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.