Skip to main content
Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

Configuration Version API

Download OpenAPI (YAML)Version 1.0

Base URL: https://localhost:8090

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
ScopeDescription
systemManage 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

CodeDescriptionSchema
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
NameTypeRequiredDescription
namestring

What to call the version.

notestring

A note to remember the version by.

currentboolean

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

CodeDescriptionSchema
200

The configuration matches a version already captured, which is answered, marked unchanged.

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

NameInTypeRequiredDescription
versionpathstringYes

The version's hash, a prefix of at least seven of its characters, or latest. current reads the configuration as it stands, the way a capture would, without keeping it: its references say what each value is for before any capture, and its version is the hash a capture would give it, so it matches the latest version when nothing has changed since. Only this read takes it. Each read runs a full export, as a capture does, so read it when a view opens rather than polling it. Only version, references, resources and skipped describe the configuration: current has no name or note, and its createdAt is the time of the read.

Responses

CodeDescriptionSchema
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, latest or current

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
NameTypeRequiredDescription
numberinteger

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.

versionstring

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.

namestring

What the version is called.

notestring
unchangedboolean

Only in a capture's answer, when the configuration matched this version already captured.

currentboolean

Set on the newest version when it was captured as the current one: a capture with current replaces it in place until it is applied to a gateway. Once an apply sends it, it is kept and stays current until the next capture.

createdAtstring (date-time)
createdByActor

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.idstringYes

The token's sub claim, or the claim server.security.trusted_issuer.user_id_claim names.

createdBy.namestringYes

The user's name as the trusted issuer's user API reports it, read when the record is read and never stored.

resourcesstring

The exported configuration, one document per resource. Left out of a listing.

referencesarray of ValueReference

Each place the version refers to a variable or a secret. Only a read of one version carries it.

skippedarray 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
NameTypeRequiredDescription
idstringYes

The token's sub claim, or the claim server.security.trusted_issuer.user_id_claim names.

namestringYes

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
NameTypeRequiredDescription
namestring

What to call the version.

notestring

A note to remember the version by.

currentboolean

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
NameTypeRequiredDescription
namestring

The name the gateway holds the value under.

kindstring

Allowed values: variable, secret

resourceTypestring
resourceIdstring
resourceNamestring

How the resource is known, its name or a user's username.

fieldstring

The key the reference is the value of, or the list's key for a list item.

listboolean

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 ["https://a.example/cb"], or a single string for one item.

Error​

Type: object

3 properties
NameTypeRequiredDescription
codestring
messageI18nMessage
descriptionI18nMessage

I18nMessage​

Type: object

2 properties
NameTypeRequiredDescription
keystring
defaultValuestring

Was this page helpful?