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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 0

DSS API ScheduleExtractNow wrong location address

I use ScheduleExtractNow functionality to retrieve data immediately. When my query takes to long (more than 30 s), I get response with status code 202. According to the documentation I grab the "Location" field from the response's header and issue GET against this location to poll the report to determine when it has completed. Unfortunately, when I send the request based on this location I receive 501 status code. I figured out that location field gives me the wrong address. The correct one, according to REST API Tree, should look like this:

.../Extractions/Schedules({id})/ThomsonReuters.Dss.Api.Extractions.ScheduleExtractNowResult(Extraction='id_report_ext') 

but I actually get sth like this

.../Extractions/Schedules({id})/DataScope.Select.Api.Extractions.ScheduleExtractNowResult(Extraction='id_report_ext') 

from the location field. This is a bug, am I right?

dss-rest-apidatascope-selectdsserror
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.

Upvotes
Accepted
28.3k 30 11 15

Hello @adam.pytel,

I think you are noticing that in cases when ScheduleExractNow request that does not complete with Status 200 and is accepted with Status 202, it returns invalid location header:

When we try to use this location to get result:

{
                {protocol}}{
                {host}}{
                {api}}Extractions/Schedules('0x0749e802b926f86b')/DataScope.Select.Api.Extractions.ScheduleExtractNowResult(ExtractionId='0x0749e802f656f86b') 

does not work, it should be

{
                {protocol}}{
                {host}}{
                {api}}Extractions/Schedules('0x0749e802b926f86b')/ThomsonReuters.Dss.Api.Extractions.ScheduleExtractNowResult(ExtractionId='0x0749e802f656f86b') 

And then the link works as expected.

We see the same, and are going to ask product to verify this behavior.


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.

Upvotes
14.7k 39 12 18

Hi @adam.pytel,

Can you please post your complete query, or attach a file showing that you are trying. The Location header in the response message should be a fully qualified URL, and not the canonical notation that you have shown here. Here is an example of it with TickHistoryTimeAndSalesExtractionRequest:

https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRawResult(ExtractionId='0x074****899')

I have not tried it yet with ScheduleExtractNow. Can you post the raw HTTP request/response messages that you see.

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.