Export
You can create data exports through the admin UI or directly through the API. Creating exports through the API is helpful when needing to automate an export process.
Export object instances define export jobs to run including details such as type of export, query and aggregation criteria, export paths to include, and more. Each export instance represents one specific export job. Export jobs are queued in the background and each org can run one job at a time. Although you can create as many export jobs as you'd like, they will run sequentially in the order they were created.
Exported data is archived in zip format and stored securely in an encrypted file store within Cortex. When the export job is complete, a secure download link will be provided in the export's dataFile
property. This link can only be accessed by an authenticated user with administrator privileges. Exports are available for download for seven days, after which the export and archive are deleted.
Export archive sizes count against file storage limits in your org.
Export Object Properties
Name | Type | Description |
| String | The label for your export. This appears in the export jobs UI |
| String | The description of your export. If present, this appears in the export jobs UI |
| String | The current state of the export job. Can be |
| Boolean | When selected, if the export contains files, they will be included along-side the exported data. Note, this can cause exports to take a long time to complete if there are many large files. |
| Boolean | Applies with exporting files. If true, files are archived together in a zip archive within the exported archive. |
| MIME-type | The format of the exported data. Valid types are: |
| String | The plural name of the Cortex object being exported. |
| String Array | Optional array of property names to include in the export. When no paths are provided, all non-optional paths are included. |
| String Array | An array of optional property names to be included in the export. |
| String Array | An array of reference property names to be expanded in the export. |
| String | Optional query argument to filter the export. See the Where query argument for more details. |
| String | A stringified custom script that will execute after export job completion. This is helpful for logging the completion of exports or sending notifications, etc. |
| ObjectId | When set, the export runs as this principal. This is helpful when exports need to be limited by acl and when used in conjunction with a path prefix. |
| String | When a prefix is present the export can be limited to documents available in a write-through list or nested document array. |
List
GET
https://api.dev.medable.com/your_org_name/v2/exports
Path Parameters
Name | Type | Description |
---|---|---|
your_org_name | string |
Read
GET
https://api.dev.medable.com/your_org_name/v2/exports/export_id
Path Parameters
Name | Type | Description |
---|---|---|
your_org_name | string | |
export_id | string |
Create
POST
https://api.dev.medable.com/your_org_name/v2/exports
Path Parameters
Name | Type | Description |
---|---|---|
your_org_name | string |
Request Body
Name | Type | Description |
---|---|---|
label | string | |
objects | string | |
format | string | |
exportFiles | boolean | |
zipFiles | boolean |
Delete
DELETE
https://api.dev.medable.com/your_org_name/v2/exports/export_id
Path Parameters
Name | Type | Description |
---|---|---|
your_org_name | string | |
export_id | string |
Last updated