Configuration Version API
Captures this deployment's configuration as versions, to apply to the gateways it administers.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
clientCredentials flow, token URL /oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Manage this deployment |
Configuration Versions
The captured versions of this deployment's configuration.
List configuration versions
GET /configuration-versions
Lists the captured versions of this deployment's configuration, newest first. A listing leaves each version's content out.
Scopes: system
Responses
| Code | Description | Schema |
|---|---|---|
200 | The versions | array of Version |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
Capture a configuration version
POST /configuration-versions
Records this deployment's configuration as it is now, through the export, as a new version. Every resource is captured, users and groups included. A user's credentials are captured as references, which the gateway fills in from its own store.
A resource the export cannot write, such as a user with no username, is left out of the
version, as the export leaves it out of its own answer, and is listed in skipped with why.
A version keeps users and groups as they were when it was captured. Applying an older version therefore brings back a user deleted since, with the attributes it had then.
A control plane exports references, so its versions hold no values. A deployment that exports template placeholders keeps their values with the version, encrypted, and never returns them.
Only the configured number of versions is kept (gateway.max_versions). The oldest is removed
first, except a version some gateway holds or could be reverted to. Those are kept even when that
leaves more versions than the configured number.
A version is named by the SHA-256 of the configuration it captured: the exported documents as
written, with their references or placeholders, not the values those stand for. Values differ
from one gateway to the next, so they are no part of what a version is. Capturing
configuration that matches a version already captured answers 200 with that version, marked
unchanged, rather than keeping it twice, and the version keeps the values it was captured with.
A configuration that refers to a secret from a field that holds no credential is refused with
400 (GTW-1026), naming each place the secret stands: every gateway would refuse the resource
on import. Secrets may stand only in the fields listed under value references.
Scopes: system
Request body: application/json
Schema: CaptureRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | What to call the version. | |
note | string | A note to remember the version by. | |
current | boolean | Keeps the configuration as the current version rather than adding one. The newest version is replaced in place when it was captured as current and has not been applied to a gateway; otherwise a new current version is added. A control plane captures this way on its own after each change to the configuration. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | The configuration matches a version already captured, which is answered, marked | Version |
201 | The captured version, with its content | Version |
400 | The request is malformed | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
Get a configuration version
GET /configuration-versions/{version}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version | path | string | Yes | The version's hash, a prefix of at least seven of its characters, or |
Responses
| Code | Description | Schema |
|---|---|---|
200 | The version, with its content. Its values are not returned. | Version |
400 | The version is not named by its hash, a prefix of it, | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
404 | No version of that hash was captured | Error |
Schemas
Version
Type: object
13 properties
| Name | Type | Required | Description |
|---|---|---|---|
number | integer | The version's place in order, from 1. It stays the same as older versions are removed, so the console shows it as the version's number. | |
version | string | The SHA-256 of the captured documents, in hex, values left out. Any prefix of at least seven characters that no other version shares also names it; the console shows the first seven. | |
name | string | What the version is called. | |
note | string | ||
unchanged | boolean | Only in a capture's answer, when the configuration matched this version already captured. | |
current | boolean | Set on the newest version when it was captured as the current one: a capture with | |
createdAt | string (date-time) | ||
createdBy | Actor | The user the version was captured for: who captured it, or whose change a capture after a change followed. A current version replaced in place names the latest change's user. Left out when the user's name cannot be read. | |
createdBy.id | string | Yes | The token's |
createdBy.name | string | Yes | The user's name as the trusted issuer's user API reports it, read when the record is read and never stored. |
resources | string | The exported configuration, one document per resource. Left out of a listing. | |
references | array of ValueReference | Each place the version refers to a variable or a secret. Only a read of one version carries it. | |
skipped | array of object | Only in a capture's answer: the resources the export could not write, left out of the version, each with why. Not kept with the version. |
Actor
Type: object
A user, by id and name. Given out only when the control plane is configured to look names up at
its trusted issuer (server.security.trusted_issuer.user_lookup) and the issuer knows the user;
otherwise the field holding the user is left out, since the id alone is an identifier of the
issuer's that says nothing to a viewer. The id is recorded either way.
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The token's |
name | string | Yes | The user's name as the trusted issuer's user API reports it, read when the record is read and never stored. |
CaptureRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | What to call the version. | |
note | string | A note to remember the version by. | |
current | boolean | Keeps the configuration as the current version rather than adding one. The newest version is replaced in place when it was captured as current and has not been applied to a gateway; otherwise a new current version is added. A control plane captures this way on its own after each change to the configuration. |
ValueReference
Type: object
One place a version refers to a variable or a secret: the resource that holds the reference and the field it stands in, so the value can be told apart by what it is for.
7 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | The name the gateway holds the value under. | |
kind | string | Allowed values: | |
resourceType | string | ||
resourceId | string | ||
resourceName | string | How the resource is known, its name or a user's username. | |
field | string | The key the reference is the value of, or the list's key for a list item. | |
list | boolean | Set when the reference is a list's item. The value it names holds the list's items, as a JSON
list of strings such as |
Error
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
message | I18nMessage | ||
description | I18nMessage |
Was this page helpful?