while Retrieving schedule id with schedule name request getting stuck
Trying to get the schedule id from name but given request is getting stuck.please help
String urlGet = urlHost + "/Extractions/ScheduleGetByName(ScheduleName='" + ScheduleName + "')";
HttpGet request = new HttpGet(urlGet);
request.addHeader("Authorization", "Token "+sessionToken);
System.out.println("Retrieve Schedule with this name: "+ ScheduleName); ---running till here
HttpResponse response = httpclient.execute(request); -- getting stuck at this point if given schedule is not availble
Best Answer
-
- yes we are using proxy, one of user suggested to increase MaxConnPerRoute.it worked. Anayways Thank you for trying
0
Answers
-
Hi @samara,
I have tried the code, but cannot replicate the issue. If the schedule name is not available, the server will return HTTP 404 status with error message in payload. The application should handle the status.
Below is the code I use. Could you please try?
String urlGet = urlHost + "/Extractions/ScheduleGetByName(ScheduleName='" + ScheduleName + "')";
HttpGet request = new HttpGet(urlGet);
request.addHeader("Authorization", "Token "+sessionToken);
System.out.println("Retrieve Schedule with this name: "+ ScheduleName);
HttpResponse response = httpclient.execute(request);
System.out.println("Get ScheduleByName. HTTP status: "
+ response.getStatusLine().getStatusCode());
BufferedReader rd = new BufferedReader(
new InputStreamReader(response.getEntity().getContent()));
StringBuffer result = new StringBuffer();
String line = "";
while ((line = rd.readLine()) != null) {
result.append(line);
}
System.out.println("JSON results received:\n"+result);Output:
Retrieve Schedule with this name: incorrect
Get ScheduleByName. HTTP status: 404
JSON results received:
{"error":{"message":"Exception of type 'ThomsonReuters.Dss.Core.Exceptions.NotFoundException`1[ThomsonReuters.Dss.Api.Extractions.Schedules.Schedule]' was thrown."}}0 -
even my code is working the thing is i have three similar requests to check instruments list , report and schedule because daily we create and drop the these because our requests are adhoc. daily we use the same name so to avoid failure we are checking first and then we are creating if first two returns 404 the third request is getting stuck
0 -
Is it possible that the issue is related to a specific schedule name? Could you try other schedule name which is also unavailable?
0 -
Tried still getting stuck. if first two returns 404 then third one getting stuck.if i submit third request alone it is working
0 -
Thanks for the information. I have tried to call InstrumentListGetByName, ReportTemplateGetByName and ScheduleGetByName subsequently and still get all 404 responses. Is your application behind proxy? Is it possible that the proxy block the 3rd 404 response?
To isolate the issue, could you change the sequence of the calls? For example, the 3rd call is on InstrumentListGetByName.
0 -
Thank you for the update. Glad to know that the issue is solved.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 37 Alpha
- 167 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 705 Datastream
- 1.5K DSS
- 633 Eikon COM
- 5.2K Eikon Data APIs
- 14 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 6 Trading API
- 3K Elektron
- 1.5K EMA
- 259 ETA
- 569 WebSocket API
- 40 FX Venues
- 16 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
- 4 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 284 Open PermID
- 47 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 24 RDMS
- 2.2K Refinitiv Data Platform
- 879 Refinitiv Data Platform Libraries
- 5 LSEG Due Diligence
- 1 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
- 123 Open DACS
- 1.1K RFA
- 108 UPA
- 196 TREP Infrastructure
- 232 TRKD
- 919 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 103 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛