ReportRun, in this post you can specify any filtering you
want to apply to the output. You then can fetch the result of this run in a
separate request as a CSV.
Creating a report run
The first step in creating aReportRun is finding the id of the Easol report you want to fetch the data for.
You can do this by using the /reports endpoint
cURL
/reports/{report_id}/runs
endpoint. There’s a number of parameters you can send to this endpoint for
filtering your data
If you only want to fetch data since a certain time you can use
interval_start, this expects an ISO 8601 timestamp.If you only want to fetch data up until a certain time you can use
interval_end, this expects an ISO 8601 timestamp.You can use the
search_query param to perform a plain text search across the data in your report.If you’re maintaining the data from your reports elsewhere you might only want to fetch data which has changed since the last type you fetched, you can use
last_updated_since for that, this expects an ISO 8601 timestamp.cURL
ReportRun object like:
Fetching the result of a report run
Now that we have a report run created we can use itsid to check on the state of the report run and then fetch its data.
Using the /reports/runs/{id} endpoint we can check on the state of a report.
This state can be one of ["pending", "succeeded", "failed"], once a run is in the succeeded state you can keep checking by polling this request.
If a run is succeeded then there’ll be a new result property available on the ReportRun
resultproperty reference a /reports/files/{id} endpoint which we can now use to fetch the results of our report.
cURL
text/csv response which contains the CSV data for the report you requested.