- "Project Settings"
- Click "Export This Project" and the download will start automatically
- Select the project to export
export-<ID>.zip file will be created in the same directory.
Projects may be exported through their GraphQL API. Exports run in the background. When the export is complete, you'll be given a download URL for the ZIP file containing your project. Most exports should happen within a few seconds, but more complex projects may see longer export times.
You can run your export from anywhere you can make a GraphQL query. This means you're able to create exports from your project's API Explorer, from within your application, or with a script file.
Since they happen in the background, exporting your project is a two step process:
- You'll trigger the export by using the
tsExportProjectmutation. The mutation will return the export id as a string. You may opt to export your project's structure without its data by providing the
- You'll check for the export's download URL by using the
tsGetProjectExportquery. The query will requires the export ID you obtained in the previous step. While the export is running, the
statusfield will be
filefield will be
null.When the export completes,
filewill contain your download URL.
The project export will be a ZIP file, which you can unarchive locally. After unzipping, you'll find a common set of files:
pattern.yml, which contains metadata about your project
schema.json, which contains your project's schema
data.jsonl, which contains your project's data. If you opt to export an empty project, this file will not be included in your export.
roles.json, which contains your project's custom roles if you have any.
First, you'd trigger your export using the
The mutation would return an export ID as a result.
You'd then provide the export ID to the
When the export is completed, the result will contain the download URL.
To export an empty project, provide the argument to the mutation.
Then, follow the same steps as above to query for your export file.
Project zip files can be imported via the API using the
tsImportProject mutation. For example:
The mutation returns an import ID. You can use that ID to get the status of your import like this:
Alternately, if you need somewhere to upload your project zip, you can use the
tsUploadProject mutation. The
tsUploadProject mutation returns a signed S3 URL. You'll upload your zip by doing a HTTP PUT to that URL with your zip
file. After you do this, the project zip will be automatically imported and deleted.
The CLI has an
import command that accepts two arguments:
- A required
--fromflag tells the command where the project you're importing is located. It can be a URI, like to a project in GitHub, the path to a project zip file on your machine, or the path to a project directory that the CLI will zip up for you.
- An optional
--nameflag provides an override for the name of the project that will be created by the import. Currently, this flag only applies when the import source is a URI, but we're working to support it on local file uploads, as well.