Importing Versions
You do not need the service token to publish a version. Administrators and editors can import a specification from a file in the UI, and anyone who can read a service can export a stored version.
Roles: Import version is for
adminandeditor, scoped to the services they can access. Export of a version is available to every user who can see the versions table.
Importing a version#
- Open the service page and find the Versions section.
- Click Import version.
- Pick a Swagger/OpenAPI file (other supported formats follow the same rules as publishing).
- Optionally enter a branch name. It defaults to
main. - Confirm.
The import goes through the same pipeline as a publish, only the authorization differs: it uses your session instead of the service token. The version is stored and, if its branch equals the service's main branch, diffed into the Change Log, made current and rebuilt.
A failed import (invalid JSON/YAML, missing info.title, oversized file) shows the same error a publish would, without closing the dialog, so you can fix the file and try again.
Importing a file identical to the current version creates no new version. The dialog tells you the version is identical to the current one. After a successful import that creates a version, the Versions section stays open.
Exporting a version#
Every row in the versions table has an Export button. It downloads that exact stored specification as {slug}-{id}.json. Reading a version needs only the same read access as the version list.
Versions table#
When a service has more than 10 versions the table paginates 10 per page. A Branch field above the table narrows the list to one branch and defaults to the service's main branch on every page load. See Versions and Branches.