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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
38 3 8 8

DataScopeSelect mandatory name changes - PriceHistoryExtractionRequest

I made the changes to our system that were communicated to us, but I am unable to make it work.


For example, I make this request:

{
  "ExtractionRequest": {
    "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest",
    "ContentFieldNames": [
      "RIC",
      "High Price",
      "Low Price",
      "Universal Close Price",
      "Trade Date"
    ],
    "IdentifierList": {
      "@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",
      "InstrumentIdentifiers": [
        {
          "Identifier": "AAPL.OQ",
          "IdentifierType": "Ric"
        }
      ]
    },
    "Condition": {
      "AdjustedPrices": true,
      "QueryStartDate": "2010-05-12T12:43:17.137Z",
      "QueryEndDate": "2021-05-12T12:43:17.137Z"
    }
  }
}

to

https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRaw


Then I get an ExtractRawResult which I follow to its RawExtractionResults which says to me


{
  "error": {
    "code": "EntitySetController Unmapped Request ErrorCode",
    "message": "EntitySetController Unmapped Request ~/entityset/key/unresolved"
  }
}
dss-rest-apidssdatascope-select
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
47.4k 111 44 60

@davet1

It works fine for me.

First, I sent the request to /Extractions/ExtractRaw and got the following response.

The response contains the JobId so I use the JobId with Extractions/RawExtractionResults('{ {jobId}}')/$value and get the data.


1621410385126.png (69.7 KiB)
1621410473874.png (54.4 KiB)
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
38 3 8 8

Ok, I tried it again:


Posting:

{"ExtractionRequest":{"@odata.type":"#DataScope.Select.Api.Extractions.ExtractionRequests.PriceHistoryExtractionRequest","ContentFieldNames":["RIC","High Price","Low Price","Universal Close Price","Trade Date"],"IdentifierList":{"@odata.type":"#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers":[{"Identifier":"AAPL.OQ","IdentifierType":"Ric"}]},"Condition":{"AdjustedPrices":true,"QueryStartDate":"2010-05-19T07:20:44.430Z","QueryEndDate":"2021-05-19T07:20:44.430Z"}}}


received response:

202

with header

Location: https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRawResult(ExtractionId='0x078f3010c68c9590')

which I then hit with GET

https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ExtractRawResult(ExtractionId='0x078f3010c68c9590')


which received a 200:

{"@odata.context":"https://selectapi.datascope.refinitiv.com/RestApi/v1/$metadata#RawExtractionResults/$entity","JobId":"0x078f3010c68c9590","Notes":["Extraction Services Version 14.5.42294 (737b0965c07f), Built Apr  8 2021 13:46:52\r\nProcessing started at 05/19/2021 07:20:50.\r\nUser ID: 9021462\r\nExtraction ID: 2000000260840704\r\nSchedule: 0x078f3010c68c9590 (ID = 0x0000000000000000)\r\nInput List (1 items):  (ID = 0x078f3010c68c9590) Created: 05/19/2021 07:20:49 Last Modified: 05/19/2021 07:20:49\r\nReport Template (5 fields): _OnD_0x078f3010c68c9590 (ID = 0x078f3010c6ac9590) Created: 05/19/2021 07:20:47 Last Modified: 05/19/2021 07:20:47\r\nSchedule dispatched via message queue (0x078f3010c68c9590)\r\nSchedule Time: 05/19/2021 07:20:48\r\nTimeseries Date Range: 05/19/2010 to 05/19/2021\r\nProcessing completed successfully at 05/19/2021 07:20:51, taking 1.184 Secs.\r\nExtraction finished at 05/19/2021 07:20:51 UTC, with servers: x04q24, ETS (0.4 secs), QSHC15 (0.0 secs), QSSHA1 (0.0 secs)\r\nUsage Summary for User 9021462, Client 108638, Template Type Price History\r\nBase Usage\r\n        Instrument                          Instrument                   Terms          Price\r\n  Count Type                                Subtype                      Source         Source\r\n------- ----------------------------------- ---------------------------- -------------- ----------------------------------------\r\n      1 Equities                                                         N/A            N/A\r\n-------\r\n      1 Total instrument charged.\r\n      0 Instruments with no reported data.\r\n=======\r\n      1 Instrument in the input list.\r\nNo Evaluated Pricing Service complex usage to report -- 1 Instrument in the input list had no reported data.\r\n"]}


which I then followed to


https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/RawExtractionResults('0x078f3010c68c9590')/value


which said:


{"error":{"code":"EntitySetController Unmapped Request ErrorCode","message":"EntitySetController Unmapped Request ~/entityset/key/unresolved"}}


Could you point out what I'm doing wrong?


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.

It should be "$value", not "value".

https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/RawExtractionResults('0x078f3010c68c9590')/$value