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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 0

DSS RESTAPI throwing error

curl -X POST \
-H "Authorization: Token $token" \
-d '{ {"ExtractionRequest": {"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.IntradayPricingExtractionRequest",\
"ContentFieldNames": [ "RIC", "Ask Price", "Bid Price", "Trade Date" ],"IdentifierList": {"@odata.type": \
"#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": \
[{ "Identifier": "FN3015TB1=FINR", "IdentifierType": "Ric" },{ "Identifier": "FN3020TB1=FINR", "IdentifierType": "Ric" }},\
"Condition": { "ScalableCurrency": true }}}' \
https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/Extract

Response:

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 599 100 80 100 519 254 1648 --:--:-- --:--:-- --:--:-- 1926{"error":{"message":"Value cannot be null.\r\nParameterName=ExtractionRequest"}}


#technologydss-rest-api
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.

1 Answer

· Write an Answer
Upvote
Accepted
23.7k 61 15 21

The request as shown in your question is incorrect and not a proper JSON message - its missing a few brackets.

You will also need to include headers to indicate what type of payload it is. Please use Postman or Python examples to try out the API samples.

curl -X POST -H "Authorization: Token ***" -H "Content-Type: application/json" -d @requestBody.txt "https://selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/Extract"
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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.