Export
Last updated
Last updated
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.
GET
https://api.dev.medable.com/your_org_name/v2/exports
GET
https://api.dev.medable.com/your_org_name/v2/exports/export_id
POST
https://api.dev.medable.com/your_org_name/v2/exports
DELETE
https://api.dev.medable.com/your_org_name/v2/exports/export_id
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name
Type
Description
label
String
The label for your export. This appears in the export jobs UI
description
String
The description of your export. If present, this appears in the export jobs UI
state
String
The current state of the export job. Can be pending
, running
, ready
, error
exportFiles
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.
zipFiles
Boolean
Applies with exporting files. If true, files are archived together in a zip archive within the exported archive.
format
MIME-type
The format of the exported data. Valid types are: application/x-ndjson
: New-line delimited JSON application/json
: JSON format * text/csv
: CSV format
objects
String
The plural name of the Cortex object being exported.
paths
String Array
Optional array of property names to include in the export. When no paths are provided, all non-optional paths are included.
include
String Array
An array of optional property names to be included in the export.
expand
String Array
An array of reference property names to be expanded in the export.
where
String
Optional query argument to filter the export. See the Where query argument for more details.
afterScript
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.
principal
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.
prefix
String
When a prefix is present the export can be limited to documents available in a write-through list or nested document array.
your_org_name
string
your_org_name
string
export_id
string
your_org_name
string
label
string
objects
string
format
string
exportFiles
boolean
zipFiles
boolean
your_org_name
string
export_id
string