Using an existing Instrument List brings back no response

When I use the following request to use one of my instrument lists:

{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentListIdentifierList",
"InstrumentListId":"0x05e32bba6bab3036"
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2017-09-29T12:00:00.000Z",
"QueryEndDate": "2017-09-29T12:01:00.000Z",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"DisplaySourceRIC": true
}
}
}

I receive no response at all, even though if I change the request to only contain a single Instrument:

{
"ExtractionRequest": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryRawExtractionRequest",
"IdentifierList": {
"@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
"InstrumentIdentifiers": [{
"Identifier": "EUR=",
"IdentifierType": "Ric"
}]
},
"Condition": {
"MessageTimeStampIn": "GmtUtc",
"ReportDateRangeType": "Range",
"QueryStartDate": "2017-09-29T12:00:00.000Z",
"QueryEndDate": "2017-09-29T12:30:00.000Z",
"ExtractBy": "Ric",
"SortBy": "SingleByRic",
"DomainCode": "MarketPrice",
"Fids": "3754",
"DisplaySourceRIC": true
}
}
}

I receive the normal response, pertaining to the JOB ID.

Any idea what I need to do to alter my JSON request to make this work correctly?

Best Answer

  • @Keech.Achara, sorry I misunderstood your query.

    The request syntax is correct.

    What you observe is unrelated to the fact that in one case you used an instrument list saved on the server, and in the other passed the actual instrument list as a parameter. If you run the same requests several times you will end up running into the same "issue" in both cases.

    I guess that the "empty" response was returned after 30 seconds. If the body of the response is empty, that can be normal. Check the HTTP status of the response, it will be 202 accepted. That means the request was accepted, but the extraction is not yet complete; that is why the body is empty and you receive a 202.

    If the extraction completes in less than 30 seconds you receive a non empty body (with the JobId) and the HTTP status is 200 Ok.

    In the case of a 202 the HTTP response header contains a location URL, something like this:

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

    Do a GET on that URL, and repeat until it delivers a response (HTTP status 200). That response will contain the JobId.

    This workflow is described in REST API Tutorial 3, see this section in particular.

Answers