Getting Latest Extraction Steps
I have a report template (FXMain) with a daily schedule (FXDaily). I am looking to use Microsoft Flow to get the latest extract for the report.
In the API documentation, it makes it seem as though I have to jump through numerous hoops to get to that data. None of those hoops seem to rely on the basic information I already have - the name of the report and the name of the schedule.
Step 1 Authenticate
POST https:
//selectapi.datascope.refinitiv.com/RestApi/v1/Authentication/RequestToken HTTP/1.1
Prefer: respond-async
Content-Type: application/json; odata=minimalmetadata
{
"Credentials"
: {
"Username"
:
"<Your Username>"
,
"Password"
:
"<Your Password>"
}
}
I then analyze this to get a token
Step 2 Get list of Schedules
POST https:
//selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/Schedules HTTP/1.1
sort through that to find the schedule Id
Step 3:For a given schedule ID, find the extractions
GET https:
//selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/Schedules('0x05807049631b1f86')/LastExtraction HTTP/1.1
Authorization: Token <your_auth_token_goes_here>
Prefer: respond-async
dig through those results to find the report ID
Step 4: Download the report
GET https:
//selectapi.datascope.refinitiv.com/RestApi/v1/Extractions/ReportExtractions('6651450') HTTP/1.1
Authorization: Token <your_auth_token_goes_here>
Prefer: respond-async
Is this the correct procedure?
Is there nothing simpler that will just say "Download the data for the last extract of report FXMain in the FXDaily schedule"?
Best Answer
-
Hello @tzak,
For scheduled extraction approach:
1. You will need to authenticate once, per 24 hours. Within 24 hrs you can reuse the existent authentication token.
2. Once you have your scheduleID at hand (or stored in the app) you will not need to do this, you will use the schedule ID that you have.
3. You will need to lookup the last extraction's job ID. It is unique and will be required to obtain the result. I would also consider checking the status of the job to be completed, prior to downloading the result.
4. Downloading the result will need to be done.
This approach covers scheduled extractions, emulating processing via DSS GUI.
---
You may wish to review "on-demand" extraction approach, please see REST API Tutorial 3: On Demand data extraction workflow for more information. It is also asynchronous, and processing is separated into several steps, it may potentially align better with your use case/requirements.
---
These are the two available approaches.
I hope this information helps.
0
Answers
-
Your reply is lacking some details.
I am able to get the last extractionId, but when I run the /RestApi/v1/Extractions/ReportExtractions('MyExtractionId') command, it just gives me ome metadata about the extraction and it does not have a jobId in there. How can I get the actual file containing the data if I have an extraction Id?
0 -
Hello @tzak ,
Please see Tutorial: REST API Tutorial 12: GUI control calls: immediate extract, starting with section "Check Extraction Status" for the complete details on:
- Checking job status
- Awaiting job completion
- Retrieving extracted data
Is this information helpful?
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛