Query Exports
Last updated
Was this helpful?
Last updated
Was this helpful?
The platform allows you to export data as ndjson
, based on . This action is available in the navigator or through API to automate the process.
For punctual exports, you may want to use the navigator (in Data Studio > Exports) rather than our API for more simplicity.
An export is a definition with:
a name
an output format (always JSON
for now)
a type (always QUERY
for now)
an associated query
an associated
an associated
Each export has executions representing its result at a given time.
An execution goes through different stages:
Pending
if the export is not started
Running
if the export is started
Succeeded
or Failed
once the export has been completed
The resulting file is formatted in , and contains the properties you selected in the SELECT
part of the OTQL query.
GET
https://api.mediarithmics.com/v1/exports?organisation_id=:orgId
orgId
integer
The ID of the organisation for which you want to list exports
GET
https://api.mediarithmics.com/v1/exports/:exportId?organisation_id=:orgId
exportId
integer
The ID of the export
orgId
integer
The ID of the organisation containing the export
POST
https://api.mediarithmics.com/v1/exports?organisation_id=:orgId
orgId
integer
The ID of the organisation
Body
string
the request payload
POST
https://api.mediarithmics.com/v1/exports/:exportId/executions
exportId
integer
The ID of the export
Body
object
Must be an empty JSON object : {}
GET
https://api.mediarithmics.com/v1/exports/:exportId/executions
exportId
integer
The ID of the export
The result of an export is saved as a data file in the platform.
You have two methods to retrieve it :
Using the exports API (recommended)
Using the data_file API
GET
https://api.mediarithmics.com/v1/exports/:exportId/executions/:executionId/files/technical_name=:technicalName
exportId
integer
The ID of the export
executionId
integer
The ID of the execution for which to download the report
technical_name
string
The name of the file(s) in the result.output_files
of the execution. Usually export
when there is a single file.
GET
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/:organisationId/jobs/executions/:executionId/result/export.data
executionId
string
The ID of the execution
organisationId
integer
The ID of the organisation
GET
https://api.mediarithmics.com/v1/data_file/data?uri=mics://data_file/tenants/:organisationId/jobs/executions/:executionId/result/export.error
Use this endpoint in case of a FAILED
execution status.
executionId
string
The ID of the execution
organisationId
integer
The ID of the organisation
You will first need to .