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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
1 0 0 0

HTtp request throwing error.

I am trying the following code on postman with token and I got the following response

{

"error": {

"message": "The Authorization header is malformed. Supported Authorization types are Token,Basic."

}

}

for the below request

Content-Type: application/json; odata=minimalmetadata

{

"ExtractionRequest": {

"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.ElektronTimeseriesExtractionRequest",

"ContentFieldNames": [

"Ask",

"Bid",

"High",

"Last",

"Low",

"Trade Date"

],

"IdentifierList": {

"@odata.type": "#DataScope.Select.Api.Extractions.ExtractionRequests.InstrumentIdentifierList",

"InstrumentIdentifiers": [

{

"Identifier": "TRI.N",

"IdentifierType": "Ric"

}

],

"ValidationOptions": null,

"UseUserPreferencesForValidationOptions": false

},

"Condition": {

"ReportDateRangeType": "Range",

"QueryStartDate": "2015-12-01T00:00:00.000Z",

"QueryEndDate": "2015-12-02T00:00:00.000Z"

}

}

}


dss-rest-apitick-history-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.

Upvotes
Accepted
32.2k 39 11 19

Hello @gkusampudi ,

I was able to run the same request via Postman, without issues. I have updated the headers to include Content-Type: application/json and odata=minimalmetadata.

From the error message, it appears that a wrong Authorization type is applied.

As the issue does not appear to be with the request or the headers as listed but with the authorization, suggest to work through tutorial REST API Tutorial 7: On Demand End of Day extraction by downloading Postman starter and submitting the included naked ElektronTimeseries request via Postman. If that works as expected, update request body to your request. if that also works as expected, the next step is to verify Authorization aspect in your custom code.

Please see that the tutorial collection uses "Inherit Auth from parent" type of Authorization, which is populated with "No Auth", and passes Authorization token in Headers. if I change Authorization type to "Bearer Token" I am able to reproduce the same error as you see. Therefore, believe the aspect to verify in the code should be Authorization, and it should emulate the working approach from tutorial.

Hope that this information is of help

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
1 0 0 0

refinitiv.pdf. I have attached Header, Body and Authorization screenshots from postman. can you point out where is it wrong?


refinitiv.pdf (363.0 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.

@gkusampudi

The token must be prefixed with Token.

1668656547701.png


1668656547701.png (4.9 KiB)

I tried with Token{_0l86oyVJn...}

got the following error

{

"error": {

"message": "Authentication request failed because of invalid token"

}

}

I have pulled the above token using this


{

"Credentials": {

"Username": "XXXXX",

"Password": "XXXXX"

}

It should be:

Token _0l86oy... 

I removed the token.

Upvotes
1 0 0 0

now getting permission error.

1668659722441.png


1668659722441.png (88.0 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
1 0 0 0

now getting permission error.

1668659722441.png


1668659722441.png (88.0 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.

@gkusampudi

Please contact your Refinitiv account team or Sales team directly to verify your permission. The ElektonTimeSeriesReportTemplate is for the Tick History product.

If you don't have permission to access the Tick History product, you can't use that template.

Please refer to the DataScope Select Tutorials for the sample DSS requests.