Keep a project as files in Git
Export a project as plain YAML files, one per request, and import them back with a preview of what changes.
In short
You can export a project as plain YAML files, one per request and one per environment, to keep in your Git repository. You can import them back with a preview of what changes. The files never hold secret values.
Before you start
- Who: exporting needs View on the project. Importing into an existing project needs Edit.
- Plan: every plan.
- First: a project to export, or a zip of the YAML files.
Steps
- Open the project's … menu and choose "Export package…".
- On Export, choose "YAML files (for Git)" and review the export.
- Download the zip and unpack it into your repository.
- Zip the folder, or pick a single request file.
- Open the chevron beside "New request", choose "Import a package…", and on Import choose "YAML files (for Git)" and drop the file.
- Read the preview of what would be added and what would change, then import.
Result: project.yaml, one file per request under requests (grouped by test group) and one file per environment; on import, the project matches the files.
Good to know
- A placeholder stands in for a secret; you fill it in after importing.
- Requests with the same name are replaced, so importing the same files again changes nothing. You can undo every import from History.
- Suites, saved examples and sign-in profiles are not in the files yet. Use the {{brand}} package to move a whole project.
If something goes wrong
- A file is refused: the files must be plain YAML. The import refuses anchors, aliases, tags and several documents in one file, and an archive that is too large.
- A file is left out with a note: it is not a project, request or environment file.
Related
- /help/api-testing/import-export-packages
- /help/api-testing/openapi-postman-conversion