screenshot-from-rest-api-user-guide-45-46.pdf
Case : 05603568
Hi Team,
Client is unable to run a tick data query using the new REST API . Getting an error when trying to replicate page 46 of the REST API user manual.
------------------------------------------------------------
POST https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractRaw
Authorization: Token
Content-Type: application/json
Prefer: respond-async
{"ExtractionRequest": {"Condition": {"ReportDateRangeType": "Range", "MessageTimeStampIn": "GmtUtc", "ApplyCorrectionsAndCancellations": true, "ExtractBy": "Entity", "QueryEndDate": "2017-06-15T00:00:00.000Z", "DisplaySourceRIC": true, "Preview": "Content", "QueryStartDate": "2017-06-16T00:00:00.000Z"}, "IdentifierList": {"UseUserPreferencesForValidationOptions": false, "ValidationOptions": null, "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList", "InstrumentIdentifiers": [{"Identifier": "CCU7", "IdentifierType": "Ric"}]}, "@odata.type": "#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.TickHistoryTimeAndSalesExtractionRequest", "ContentFieldNames": ["THT.Quote - Ask Price", "THT.Quote - Ask Size", "THT.Quote - Bid Size", "THT.Quote - Bid Size"]}}
{'error': {'message': 'Malformed request payload: For the property name "ReportDateRangeType" in the JSON request the value could not be parsed successfully. Please check the casing or spelling of the property.'}}
'{"error":{"message":"Malformed request payload: Syntax error at Line 1, Char 71: Invalid array element type for property \'ContentFieldNames\'. Expected element type of \'ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.ExtractionRequestBase\', but found \'System.String\'. {\\"ExtractionRequest\\": {\\"ContentFieldNames\\": [\\"Auction - Exchange Tim"}}'
It looks like the JSON parser is not correctly converting datatypes.
------------------------------------------------------------