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?

Best Answer

  • zoya faberov
    zoya faberov ✭✭✭✭✭
    Answer ✓

    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:

    image

    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.

Answers