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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials

question

Upvotes
Accepted
3 0 0 2

DSS Rest Api tutorial example. Malformed request

Hi

while cheking in Postman just first example from DSS Rest API tutorials introduction Authentication Request

https://developers.refinitiv.com/en/api-catalog/datascope-select/datascope-select-rest-api/tutorials#rest-api-tutorials-introduction


In Postman I'm getting this response while trying to authenticate

"error": { "message": "Malformed request payload: Syntax error at Line 2, Char 1: expected '}' " }


But my request body looks fine, I just copied it from tutorial


1625492643885.png

dss-rest-apidatascope-selectdsspostman
1625492643885.png (54.3 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
Accepted
3 0 0 2

I've changed headers from

Content-Type: application/json

to

Content-Type: application/json; odata=minimalmetadata

And went trough

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 1

I am encountering the same error/response with the same request right from the tutorial.

"error": { "message": "Malformed request payload: Syntax error at Line 2, Char 1: expected '}' " }

Changing content-type to application/json; odata=minimalmetadata did not change the result.


Any other suggestions? Thank you

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 1

I figured out the issue and I believe it's a bug in the API. It appears that the format of the json I was sending is problematic. I am sending valid JSON so the parsing on the API side seems unnecessarily finicky.


screenshot-2021-09-14-084852.jpg


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.