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"?