DSS Rest Api with big list of identifiers

Hi,
I try to make an Extraction request for Corporate Actions based on a big list of intruments (around 180 FileCode).
The request work fine with 1 File code but I get an empty result with the full list after few seconds.
Do you have a timeout on you side?
I'm using Java to make the request, but same results using an RESTClient plugin in Firefox.
Best Answer
-
Hello @Stephane Rossi
The example to handle status code 202 can be found in DSS2TimeSeriesClient.java at timeSeriesExtractRequest() method.
For more details of handling async, please refer to https://hosted.datascopeapi.reuters.com/RestApi.Help/Home/KeyMechanisms?ctx=Extractions&stp=1&tab=0&uid=Async
0
Answers
-
Can you share the exact request you are making ?
There is a working example here that might also help you.
0 -
Here the request:
@{"ExtractionRequest":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.CorporateActionsStandardExtractionRequest","ContentFieldNames":["Actual Adjustment Type Description","Deal Cancel Date","Shares Amount Date","Company Role Description","Delete Marker","Country of Incorporation","RIC","Company RIC","Security Description","Company Name","Capital Change Ex Date","Deal Effective Date","Country","Last Update Timestamp","Corporate Actions Type","Deal Announcement Date","Capital Change Announcement Date","File Code","Thomson Reuters Classification Scheme Description"],"IdentifierList":{"@odata.type":"#ThomsonReuters.Dss.Api.Extractions.ExtractionRequests.InstrumentIdentifierList","InstrumentIdentifiers":[{"Identifier":"787","IdentifierType":"FileCode"},{"Identifier":"211","IdentifierType":"FileCode"},{"Identifier":"911","IdentifierType":"FileCode"},{"Identifier":"160","IdentifierType":"FileCode"},{"Identifier":"378","IdentifierType":"FileCode"},{"Identifier":"405","IdentifierType":"FileCode"},{"Identifier":"9","IdentifierType":"FileCode"},{"Identifier":"712","IdentifierType":"FileCode"},{"Identifier":"592","IdentifierType":"FileCode"},{"Identifier":"556","IdentifierType":"FileCode"}]},"Condition":{"ReportDateRangeType":"Range","PreviousDays":0,"QueryEndDate":"0001-01-01T00:00:00.000Z","ExcludeDeletedEvents":false,"IncludeInstrumentsWithNoEvents":false,"IncludeCapitalChangeEvents":true,"CorporateActionsCapitalChangeType":"CapitalChangeAnnouncementDate","IncludeSharesOutstandingEvents":true,"CorporateActionsSharesType":"SharesAmountDate","ShareAmountTypes":["Authorised","CloselyHeld","FreeFloat","Issued","Listed","Outstanding","Treasure","Unclassified"],"IncludeMergersAndAcquisitionsEvents":true,"CorporateActionsMergersAcquisitionsType":"DealAnnouncementDate","IncludePublicEquityOfferingsEvents":true,"CorporateActionsEquityOfferingsType":"FirstTradingDate"}}}
(I remove some identifier, this request work fine with only 1)0 -
I see in RestClient plugin in FF a status code 202 with Status "InProgress".
Then more like an asyncr call. Then how handle the reply? I don't see any example for Java
0 -
Status code 202 means the call was Accepted, i.e. the request is correct, but timed out because there is too much data. That is why the body of the response is empty.
How to handle this:
In the response header you will find a Location URL, it looks something like:
Location https://hosted.datascopeapi.reuters.com/RestApi/v1/monitor/'0x056a114ea0fb2f96'
You can retrieve the data, once it is ready, by using a GET request on that URL:
- If you run this GET request and the data is not yet ready, then you will get a similar response.
- If you run this GET request and the data is ready, then you will get the data.
- If you run this GET request again (after having received the data), then you will get a 404 (data not found).
The more data is requested, the longer it can take for it to be available.
0 -
I juste found an example of long request in
DSS2IntraDayClient.java, I try to use it.
Thanks
Stephane
0 -
Working fine ! Only a small bug in the example, the poll URL is in the header[4] and not in the header[3]. But I can check the key inside the header to found the correct value in the array.
0 -
Glad it works now. I have escalated the issue you found with the example.
0 -
Here an way to get it:
Header[] headers = response.getAllHeaders();
String pollURL = null;
for (Header entry: headers) {
if (entry.getName().equals("Location")) {
pollURL = entry.getValue();
}
}
0 -
Thank you for sharing !
0 -
Would it be possible to convert the examples to use the key rather than the index? The order of the headers is not guaranteed. Thank you @susana.chang.
0 -
@Christiaan Meihsl, Troy,
I checked the TimeSeries example (we search by the 'Location' key in the header), and this is what is in the code currently:
for (int i= 0; i< headers.length; i++) {
if (headers[i].getName().equalsIgnoreCase("Location")) {
pollURL = headers[i].getValue();
System.out.println("The Poll URL : " + pollURL);
}
}The older version of the example may have the hard coded index number.
0 -
For your information, the Java examples available under the downloads tab have been modified to optimize handling of the poll URL.
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
- 690 Datastream
- 1.4K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 559 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 279 Open PermID
- 45 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 716 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
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 95 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛