Developers · GraphQL
GraphQL Importing/Exporting Overview
Last updated 1 November 2026
Export records and users to CSV, import them in bulk, and the CLI commands that do the same for a whole instance.
The import and export operations move data in bulk. Export records or users to CSV files in a zip, or load many records or users into an instance in one call. Use them for backups, for moving data between instances, and for loading data from another system.
The operations
| Operation | Kind | What it does |
|---|---|---|
data_export | Mutation | Starts a background export of records, users or both. Returns the export with its status |
data_exports | Query | Lists exports, most recently updated first. A finished export holds the URL of its zip |
data_export_delete | Mutation | Permanently deletes an export and its file |
import_models | Mutation | Imports records in bulk. Each is updated if it matches, or created |
import_users | Mutation | Imports users in bulk, the same way |
How an export works
- Start itdata_export selects records and users the same way the records and users queries do.
- Wait for itThe export runs in a background job. Its status is pending, then done or failed.
- Download itdata_exports returns the url of the zip once status is done.
One export holds at most 5,000,000 records and 5,000,000 users. With split_files: true, the default, each table is split into files of at most 10,000 rows. Pass at least an empty object, such as records: {}, for that kind of data to be included.
Example: list the exports
Query
{
data_exports(per_page: 3) {
total_entries
results { id status created_at url }
}
}Response on the docs instance
{
"data": {
"data_exports": {
"total_entries": 0,
"total_pages": 1,
"results": []
}
}
}This ran read-only on the docs.insites.io instance on 1 November 2026, which has no exports.
The CLI does the same for a whole instance
insites-cli data export staging -p data.zipdata export, data import and data clean work on all the data on an instance. There is no per-table option. data import reads a JSON file, or a zip archive with --zip.
Common mistakes
- Reading
urlstraight afterdata_export. It is empty until the status isdone. - Leaving out
recordsorusersand getting an empty export. - Running
insites-cli data cleanto clear one table. It removes all data on the instance and cannot be undone. - Pairing the ids
import_usersreturns with the people you sent by position. They can come back in a different order; match onexternal_idsor email.