how to use API for downloading data generated by schedules created by GUI.

Hi All,
we looking for one example of downloading data which is available by schedules created by GUI.
what endpoint and parameters we need to use for GUI created schedules to download.
Basically we want to use api only for downloading part. Please help.
Best Answer
-
Hi,
I tried below endpoint but I am getting error.
Endpoint:
https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ScheduleGetByName('EC_GMT_TIC')
Error:syntax error near unexpected token `('
What could be the reason. I used endpoint as per documents.
0
Answers
-
@satish.shioshankar.gaidhane, this can be done in several steps:
1) Retrieve the Report Extraction ID(s)
You can use the following method to find the schedule IDs and report extraction IDs for recently completed
extractions:Send a GET request to this endpoint:
https://hosted.datascopeapi.reuters.com/restapi/v1/Extractions/ReportExtractionGetCompleted()
Results extract:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/restapi/v1/$metadata#ReportExtractions",
"value": [ {
"ReportExtractionId": "2000000001094891",
"ScheduleId": "0x05c876cdb03b2fd6",
"Status": "Completed",
"DetailedStatus": "Done",
"ExtractionDateUtc": "2017-07-05T15:24:11.106Z",
"ScheduleName": "Test2_ElektronTS_EoD_ISN",
"IsTriggered": false
},
{
"ReportExtractionId": "264698982",
"ScheduleId": "0x05c876beb0bb2fd6",
"Status": "Completed",
"DetailedStatus": "Done",
"ExtractionDateUtc": "2017-07-05T15:23:09.676Z",
"ScheduleName": "Test_TandC_ISN",
"IsTriggered": false,
"ExtractionStartUtc": "2017-07-05T15:23:10.000Z",
"ExtractionEndUtc": "2017-07-05T15:23:11.000Z"
},...If required you can search for specific schedules in the results, by ID or name.
Save the ReportExtractionId for the schedules of interest.
From here on, it is similar to the REST API Tutorial 10, starting from this step. In a nutshell, you first retrieve the extraction report, then the files:
2) Retrieve the Extraction Report(s)
For each schedule of interest, send a GET request to this endpoint (note that we pass the ReportExtractionId (retrieved in the previous step) as a parameter, directly in the URL):
Typical results:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ExtractedFiles",
"value": [
{
"ExtractedFileId": "VjF8fDMwMzUzMDIwOQ",
"ReportExtractionId": "2000000001094891",
"FileType": "RicMaintenanceNote",
"ExtractedFileName": "Test2_ElektronTS_EoD_ISN.ric.csv",
"LastWriteTimeUtc": "2017-07-05T15:24:23.338Z",
"ContentsExists": true,
"Size": 90,
"ReceivedDateUtc": "2017-07-05T15:24:23.338Z"
},
{
"ExtractedFileId": "VjF8fDMwMzUzMDIwOA",
"ReportExtractionId": "2000000001094891",
"FileType": "Full",
"ExtractedFileName": "Test2_ElektronTS_EoD_ISN.csv",
"LastWriteTimeUtc": "2017-07-05T15:24:23.333Z",
"ContentsExists": true,
"Size": 143,
"ReceivedDateUtc": "2017-07-05T15:24:23.333Z"
},
{
"ExtractedFileId": "VjF8fDMwMzUzMDIwNw",
"ReportExtractionId": "2000000001094891",
"FileType": "Note",
"ExtractedFileName": "Test2_ElektronTS_EoD_ISN.csv.notes.txt",
"LastWriteTimeUtc": "2017-07-05T15:24:23.340Z",
"ContentsExists": true,
"Size": 2064,
"ReceivedDateUtc": "2017-07-05T15:24:23.340Z"
}
]
}Save the ExtractedFileId for the files of interest.
3) Retrieve the Extraction Report(s)
Retrieve each file of interest, by sending a GET request to this endpoint (note that we pass the ReportExtractionId (retrieved in the previous step) as a parameter, directly in the URL):
0 -
Please note that there are other ways to do this, see the REST API User Guide pages 111 and following (note this guide if for TRTH, not DSS, but what is described in this section applies to DSS and TRTH).
0 -
Thank you. Anyone working on this type of requests using perl. any examples code.?
0 -
The ScheduleGetByName can be used with the following endpoint:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ScheduleGetByName(ScheduleName='<Schedule Name>')
Could you please try? If the issue still persist, please share the perl code you are using?
0 -
thanks..working fine
0 -
one question, if we change schedule name using GUI, does it change schedule id as well?
or once we create schedule first time, id remains same until we delete that schedule?
0 -
Also, one more doubt. I tried below end point. but its not downloading file instead print information about metadata.
O/P like similar.:@{"@odata.context":"https://hosted.datascopeapi.reuters.com/restapi/v1/$metadata#ExtractedFiles/$entity",
"ExtractedFileId":"VjFwNWNhNdfgdfDdiNzEyZWIzMDI2fA",
"ReportExtractionId":"2000000002",
"ScheduleId":"0x05c90c3bgfdfdgd3096",
"FileType":"Full",
"ExtractedFileName":"MarketData_20170711.csv.gz",
"LastWriteTimeUtc":"2017-07-11T06:49:04.000Z",
"ContentsExists":true,
"Size":11921802}0 -
@satish.shioshankar.gaidhane, this is normal, there could be several files. There is an additional step to retrieve the files, using the ExtractedFileId, with a GET to:
File type indicates what the file is: Full is the data file, Note is the extraction notes.
More details in REST API Tutorial 10. This particular step is explained here.
Edit: no, this is not normal. GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractions('214446154')/Files should deliver that O/P.
0 -
Hi. I used ExtractedFileId and I am getting above mentioned o/p
0 -
@satish.shioshankar.gaidhane, changing the name will not change the ID.
0 -
That is strange, a GET to https://hosted.datascopeapi.reuters.com/restapi/v1/Extractions/ExtractedFiles('VjFwNWNhNdfgdfDdiNzEyZWIzMDI2fA')/$value should retrieve the file. Let me double check.
0 -
@satish.shioshankar.gaidhane, I am not able to reproduce what you mention. I see what is described in REST API Tutorial 10:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractions('<reportExtractionId>')/Files delivers the list of files.
GET https://hosted.datascopeapi.reuters.com/restapi/v1/Extractions/ExtractedFiles('<ExtractedFileId>')/$value delivers the data.
If you still have this issue, could you please tell us the exact list of steps you followed till you observed this issue ?
0 -
Yes. I followed above steps.. using report extractioid I get ExtractedFieldId. and using extracted fielded, I tried to get file.. but we getting almost same o/p in both steps. Only difference is in step1 we get o/p for 2 files (notes and actual file) and in step2 we get o/p for the file for which I selected extractedfieldid.
step1:
step2 :
could you please try as well.
0 -
@satish.shioshankar.gaidhane, I cannot try with your reportExtractionId and extractedFileId, because they are linked to your account. I tried with my own account, schedule and IDs and it worked as expected.
To help me debug, could you please:
- Run step 1
- Run step 2 for all extractedFileIds delivered by step 1.
- Run step 2 for all extractedFileIds delivered by step 2.
- Post a text file (as attachment) containing every one of those calls in the order you ran them, with the complete output of every single call.
0 -
Do you use curl to run the step 2? I guess that the '$value' might be treated as variable, so the "$value" will be removed from the endpoint. Could you please add "\" before the $value?
Below is the example.
curl -H "Content-Type: Accept-Encoding: gzip, deflate" -H "Prefer: respond-async" -H "Authorization:<Token>" -X GET https://hosted.datascopeapi.reuters.com/restapi/v1/Extractions/ExtractedFiles\(\'VjF8MHgwNWM2MjUyY2VjOWIzMDM2fA\'\)/\$value
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
- 687 Datastream
- 1.4K DSS
- 623 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 557 WebSocket API
- 38 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
- 276 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
- 682 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
- 105 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛