How can I retrieve Platts Corrections through DSS REST API
When client subscribe platts through DSS, they can get daily corrections file in extraction. How can they extract that Corrections detail through API?
Best Answer
-
Hi Veerapath,
Thanks for finding out the answer from Jiajia and Bob.
Posting it below in case anyone else has the same question.
Both use GET (can be used in internet browser), step:
1) endpoint https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/OtherFiles/ then
2) use https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/OtherFiles(';{OtherFileId }')/$value to get the content.
Cheers,
Gareth
0
Answers
-
This file is generated by DSS automatically. I can get this file everyday. but client needs it through API
0 -
Hi @tao.yuan,
To retrieve last extraction file, you need to know Schedule ID by using GetByName endpoint with Schedule name.(i.e. "PlattsCorrections"). The Schedule ID should not be changed for a schedule, so application can store and reuse the ID for next retrieval.
Below is the sample of request.
Request:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ScheduleGetByName(ScheduleName='PlattsCorrections')
Response:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#Schedules/$entity",
"ScheduleId": "0x05b6ab1f77eb3026",
"Name": "PlattsCorrections",
"OutputFileName": "",
"TimeZone": "SE Asia Standard Time",
"Recurrence": {
...Below are the steps to get the extraction result from Schedule ID via API.
1) Get last Report Extraction ID for the Schedule ID using Schedule.LastExtraction.
Your corrections file is generated daily, so the schedule should be recurring. You need to get only last extraction information.
In this sample, the Schedule ID is '0x05b6ab1f77eb3026'. The last Report Extraction ID received in this sample is '2000000087212479'.
Request:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/Schedules('0x05b6ab1f77eb3026')/LastExtraction
Response:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ReportExtractions/$entity",
"ReportExtractionId": "2000000087212479",
"ScheduleId": "0x05b6ab1f77eb3026",
"Status": "Completed",
...2) Get Extracted File ID of extracted data using ReportExtraction.FullFile.
Normally an extraction will generate two files; data and Notes. You need to get ExtractedFileId for data file. The Extracted File ID for data file in this sample is 'VjF8fDUwNjM3NTg2OQ'
Request:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractions('2000000087212479')/FullFile
Response:
{
"@odata.context": "https://hosted.datascopeapi.reuters.com/RestApi/v1/$metadata#ExtractedFiles/$entity",
"ExtractedFileId": "VjF8fDUwNjM3NTg2OQ",
"ReportExtractionId": "2000000087212479",
"ScheduleId": "0x05b6ab1f77eb3026",
"FileType": "Full",
...3) Retrieve data with ExtractedFileId using GetDefaultStream.
Finally, you can retrieve the extracted data.
Request:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ExtractedFiles('VjF8fDUwNjM3NTg2OQ')/$valueFor more detailed information, please see this GUI control calls: immediate extract tutorial.
0 -
Hi,
I also need some help with this please. This thread seems like the same question so thought it was relevent not to raise a new thread.
So I also get Platts Corrections files generated into my DSS User ID. This appears to be done daily and looks like the below:
However, and this is where I think the above workflow doesn't work for these files specifically. These are files which are placed into a user's Extracted Files based on a specific permission/service, and not generated through a user's schedule (so no schedule will exist for me to use), and no Notes are generated.
Indeed I had thought there maybe some kind of hidden reserved name but...:
Gave me:
{
"error": {
"message": "Exception of type 'ThomsonReuters.Dss.Core.Exceptions.NotFoundException`1[ThomsonReuters.Dss.Api.Extractions.Schedules.Schedule]' was thrown."
}
}
I need to be able to get to ExtractedFileId for use with Get Read Stream in the minimum number of steps to:
How can I do this please?
Many thanks,
Gareth
0 -
On doing a bit more investigation it seems this is expected and is handled by endpoint:
GET https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractionGetOtherFiles
Though I still need to know the step(s) to get to stream...if anyone know hoping they can help.
0 -
Also found: https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/OtherFiles not sure if/how differs to: https://hosted.datascopeapi.reuters.com/RestApi/v1/Extractions/ReportExtractionGetOtherFiles ?
0 -
Hi @gteage01
I have done some search. Yes, you are correct. The PlattsCorrection is generated automatically by DSS, not a user's schedule. So, this method I provided may not work. I will contact DSS support for the question.
0 -
Both deliver exactly the same response, seems like they are interchangeable.
0 -
Thank you for sharing the information. Glad to know that the method works.:)
0 -
Thank you for sharing, this is useful !
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
- 280 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 中文论坛