Exports API
The exports API allows you to create and manage your project’s Exports https://support.mydatahelps.org/hc/en-us/articles/360022344173-Export-File-Type-and-Format-Summary.
Get Exports
GET /api/v1/administration/projects/:projectID/exports
Gets a list of all data exports. This report includes not only completed exports, but also ones that have been queued, are in progress, failed, etc. This gives you a full picture of your exports, similar to what you would see in MyDataHelps Designer.
Query Parameters
pageNumber
integer
If the exports span multiple pages, this is the page number to request (0 by default, 0-indexed).
pageSize
integer
The number of exports to return per page.
Response Fields
pageNumber
integer
The page number requested (0-indexed).
totalExports
integer
How many exports are available in total.
exports
collection
The individual data exports.
+ Child Fields
exports.ID
guid
Unique identifier for this export.
exports.dataStartDate
date
Starting date for the range of data included in the export, in ISO8601 format.
exports.dataEndDate
date
Ending date for the range of data included in the export, in ISO8601 format.
exports.insertDate
date
Date the export was created, in ISO8601 format.
exports.runStartDate
date
Date the export started running, in ISO8601 format.
exports.runEndDate
date
Date the export finished running, in ISO8601 format.
exports.status
string
Status of the export, one of: queued
, exporting
, uploading
, finished
, failed
, or suspended
.
exports.errorMessage
string
A user-readable error message if the export failed. Will be null if the export was successful.
exports.exportType
string
The type of export, either incremental
or onDemand
.
{
"pageNumber": 0,
"totalExports": 5,
"exports": [
{
"id": "00629f26-3eb2-4223-9201-ef42e4ccdd32",
"dataStartDate": "2022-08-30T20:39:18.93+00:00",
"dataEndDate": "2022-09-19T00:00:00+00:00",
"insertedDate": "2022-09-19T17:56:11.183-04:00",
"status": "finished",
"errorMessage": null,
"runEndDate": "2022-09-19T17:57:12.923Z",
"runStartDate": "2022-09-19T17:56:11.693Z",
"exportType": "onDemand"
},
...
]
}
Download Export
GET /api/v1/administration/projects/:projectID/exports/:exportID/data
Downloads a specific export as a ZIP file.
The response’s Content-Disposition
header will be set to attachment
and include a recommended filename. For example: Content-Disposition: attachment; filename=RK.CareEvolution.Demo_20220830-20220916.zip
Note
The file name is not guaranteed to be unique.
The ZIP file will contain each of the export files selected in the project settings. See the MyDataHelps export documentation for details on the file names and data formats.
You can only download successful exports. If the status of the requested export is anything other than finished
, a 404-NotFound error response will result.