Is there any documentation for response headers when request is invalid?

Hello.
When we send request for data and put invalid attribute, we receive response with code 400 (Bad Reqeust). This is perfectly fine. I can see all details are stored into "X-Validation-Messages" header.
Do we have any documentation about the response headers? Can the validation message model change or can we assume we will always get the response like that?
HttpResponseProxy{HTTP/1.1 400 Bad Request [Cache-Control: no-cache, Pragma: no-cache, Content-Type: application/json; charset=utf-8, Expires: -1, Server: Microsoft-IIS/7.5, X-Validation-Messages: [{"Id":"ReportTemplate.ContentFields.ContentFieldNamesMustBeValidContentFieldTypes","ItemType":"DataScope.Select.Extractions.ReportTemplates.PriceHistoryReportTemplate","ItemId":"0x0778946ebf8751ff","PropertyName":"ContentFields","Severity":4,"Message":"Invalid content FieldName \"A\"","DiagnosticMessage":null}], X-Client-Session-Id: 2c9be13f-5793-475f-a211-1ebbebe38f7a, X-Request-Execution-Correlation-Id: CiD/150533/7T6aIA.0778946ebf7751ff/RA, X-App-Id: Custom.RestApi, X-App-Version: 14.5.56.64, Date: Tue, 09 Mar 2021 14:47:01 GMT, Content-Length: 80] ResponseEntityProxy{[Content-Type: application/json; charset=utf-8,Content-Length: 80,Chunked: false]}}
Validation model contains: Id, ItemId, PropertyName, Severity, Message, DiagnosticMessage
Another question would be related to error messages, are they somewhere documented? I mean "Invalid content FieldName" etc.
I am asking because we would like to be sure if we create a response header representation on our side, and expects some error messages it will not change in some time.
Thank you,
Michał
Best Answer
-
Hello @michal.bogdal,
One of the goals of design, when integrating with DSS REST is to pinpoint and eliminate invalid/bad requests. The bad requests take up time and execution unnecessarily. I would not recommend designing into a DSS REST application a reliance on submitting invalid requests and parsing X-Validation-Messages, would suggest to tune the requests that are required during the design stage.
There are headers that are intended to investigate a specific submission, they are documented in Datascope Hosted -> Diagnostics, you will need to be logged into Datascope GUI to access the link with this information
There are also status codes that can be received from the service, they are in Datascope Hosted -> Status Codes, at least a subset of these codes is usually processed by the app.
Also, I find Extraction Notes per Extarction ID helpful, when something unexpected is found in the result, and also for Quota tracking.
0
Answers
-
Thank you. Before we send extraction request we will first check if attributes provided by users are correct. For this purpose we will use following endpoint:
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/GetValidExtractionFieldNames
Cheers,
Michał
0 -
Hello @michal.bogdal,
This is usually done in design stage, to determine what fields to use going forward, please see REST API Tutorial 3: On Demand data extraction workflow "Get available field list", the tutorial says "this step is optional".
0 -
Thank you.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 615 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 251 ETA
- 555 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 643 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 228 TRKD
- 916 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛