question

Upvotes
Accepted
35 0 1 6

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?

tick-history-rest-apiricsnda-raw
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
13.7k 26 8 12

@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.

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.

Thanks, I didn't know about the empty response bit.

I am now focusing on the header to give me the extra JOB ID.

Upvote
13.7k 26 8 12

@Keech.Achara, your query applies FID filtering. For EUR= there just happens to be no data for FID 3754 (scaling). If you replace 3754 with 25 (Ask price) in your query you will get data, which proves the request syntax is ok.

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.

I think you have misinterpreted the question. When I use an Instrument List I receive no response back from the server. When I use an explicit InstrumentIdentifiers I receive a response. This is not to regarding the extracted data but how to use an existing Instrument List with TickHistoryRawExtractionRequest.