Developers · Data
Exporting Data
Last updated 2 November 2026
You can export data using either the CLI or the raw export API. This method can be helpful when test data is needed for a service, e.g. in a staging environment.
Data export with the CLI
The Insites CLI tool features the
: The file path where the CLI saves the exported data. The default is data.zip. : By default, export will use the autogenerated for the field. When this option is set, it will use the normal from the object.
Under the hood, the CLI uses the export API described in the next section. However, using the CLI provides some significant benefits:
- Leveraging the CLI's authentication mechanism (i.e. you don't need to send your authentication token manually).
- Writing downloaded data directly to the file system.
Example:
insites-cli data export --path=export.zip productionData export using CSV files
The CLI exports a ZIP archive of CSV files by default. With no
insites-cli data export --zip --path=data.zip productionData export with raw export API
Our CLI uses the HTTP API to schedule an export task. Once it is finished, you can download the data.
curl -d @data.json
-H 'Content-Type: application/json'
-H 'Authorization: Token [YOUR API TOKEN]'
-X POST https://example.com/api/app_builder/exportscurl -H 'Content-Type: application/json'
-H 'Authorization: Token [YOUR API TOKEN]'
https://example.com/api/app_builder/exports/[export_id]?csv_export=trueData export with GraphQL
It is possible to export data with GraphQL queries. Use
query export_data($table: String!, $page: Int = 1) {
users(per_page: 100, page: $page) {
total_pages
results {
id
email
first_name
last_name
created_at
properties
}
}
records(per_page: 100, page: $page, filter: { table: { value: $table } }) {
total_pages
results {
id
table
user_id
created_at
properties
}
}
}