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.

Gateway API

Download OpenAPI (YAML)Version 1.0

Base URL: https://localhost:8090

Registers the gateways this control plane administers.

Download the OpenAPI definition (YAML)

Security schemes​

OAuth2: oauth2

clientCredentials flow, token URL /oauth2/token

1 scopes
ScopeDescription
systemManage this deployment

Gateways​

The gateways this control plane administers.

List the registered gateways​

GET /gateways

Returns every gateway this deployment administers, oldest first. No management token is included.

Scopes: system

Responses

CodeDescriptionSchema
200

The registered gateways

array of Gateway
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error

Register a gateway​

POST /gateways

Records a gateway this control plane administers.

The control plane issues the key it will present to that gateway and returns it once, in this response. Configure the gateway with it: nothing reads it back.

The gateway is not contacted. An unreachable baseUrl is found when something first calls that gateway, not here. A baseUrl must be an absolute https URL without credentials in it (400, GTW-1009), and may not name a loopback, link-local or private address unless the deployment sets gateway.allow_private_addresses (400, GTW-1027). A name is at most 64 letters, digits, spaces, hyphens, underscores and dots (400, GTW-1028).

How many gateways a deployment may hold is bounded by gateway.max_gateways, which is one unless a deployment changes it. Setting it to zero refuses every registration, for a deployment that administers none.

Scopes: system

Request body (required): application/json

Schema: RegisterRequest

5 properties
NameTypeRequiredDescription
namestringYes

A label for this gateway, unique within the deployment.

baseUrlstringYes

Where the gateway answers, and what identifies it.

One gateway registers once, so this is unique within the deployment. A gateway reached by more than one name can therefore be registered more than once, under each of them; nothing here can tell they are the same deployment. Register the name the control plane should call it by.

keystring (password)

The token this control plane will present to that gateway.

Optional. Supply it when the gateway was configured with a key first and this registration has to match; leave it out and one is generated, which is the usual way and means a key is not typed, mailed or committed on the way in. Either way the response returns it, and that is the only time it is readable.

A gateway declared in a file may name one the same way. Write it as an environment reference there, key: "{{.GATEWAY_TOKEN}}", so the file carries the name and not the credential.

caCertificatestring

A PEM certificate to trust when calling this gateway, in addition to the system roots.

For a gateway serving a certificate no public authority signed, which is what a local or on-premise deployment usually has. Leave empty for a gateway behind an ingress with a publicly-issued certificate: it verifies against the system roots with nothing here.

isDefaultboolean

Makes this the default gateway. Its baseUrl is the one the console shows for an application's runtime endpoints.

At most one gateway is the default. If another already is, it gives that up to this one. The first gateway registered is the default whether or not this is set.

Default: false

Responses

CodeDescriptionSchema
201

The registered gateway, and the key it issued. This is the only response that carries the key.

Registration
400

The request was malformed, or a required field was missing

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
409

The registration conflicts with one that already exists, or with the configured bound

Error

Get a gateway​

GET /gateways/{id}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

The gateway. The management token is not returned.

Gateway
400

The request was malformed, or a required field was missing

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Change a gateway​

PUT /gateways/{id}

Changes a registration. A field the body omits keeps the value it already has, so an address can be moved without restating the certificate.

baseUrl is what says which gateway this is, so moving it is how a gateway that moved is followed, and it is refused if another gateway already answers at that address. A new baseUrl is held to the rules of a registration: an absolute https URL without credentials (400, GTW-1009), not a loopback, link-local or private address unless the deployment sets gateway.allow_private_addresses (400, GTW-1027). A new name is at most 64 letters, digits, spaces, hyphens, underscores and dots (400, GTW-1028).

A key the body carries replaces the stored one, which is how a gateway's credential is rotated: send the new value here and give the same value to the gateway.

A body that omits it keeps what is held. Nothing is generated on an edit, because a change nobody asked for would leave the gateway unreachable until the new value reached it, and because a generated value would have to be returned by a response an edit has nowhere to put one in.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Request body (required): application/json

Schema: UpdateRequest

4 properties
NameTypeRequiredDescription
namestring

A label for this gateway, unique within the deployment.

baseUrlstring

Where the gateway answers.

caCertificatestring

A PEM certificate to trust when calling this gateway.

keystring (password)

The token this control plane presents to that gateway.

Omit it to keep the one already held. Sending a new value is how a credential is rotated, and the same value has to reach the gateway, which holds it as its management API key.

Responses

CodeDescriptionSchema
200

The updated gateway

Gateway
400

The request was malformed, or a required field was missing

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error
409

The registration conflicts with one that already exists, or with the configured bound

Error

Remove a gateway​

DEL /gateways/{id}

Removes the registration. The gateway itself is untouched and keeps running with whatever configuration it already holds.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
204

The gateway was removed

400

The request was malformed, or a required field was missing

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Get the version a gateway holds​

GET /gateways/{id}/applied-version

Reports the version last applied to the gateway, whether the gateway holds it whole or partly (N of M of its resources), and the one a revert would return it to. A gateway nothing was applied to holds neither.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

What the gateway holds

AppliedVersion
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Get the configuration a gateway runs​

GET /gateways/{id}/applied-configuration

Returns every resource the gateway's master holds, which is what the gateway accepted, each in the shape the resource's own read returns and tagged with the version that sent it, for example what GET /applications/{id} returns for an application. A console shows the configuration as the gateway runs it from this, rather than as this deployment holds it now, which may have moved on since the apply.

A value the version refers to, such as var:APPLICATION_ORDERS_CLIENT_ID, is returned as the reference: the version does not hold the value. A secret the resource's own read masks is masked the same way, and user credentials are never returned. A gateway nothing was applied to runs nothing: resources is empty and there is no version.

A version applied in part, because a selection left changes out or the gateway refused some resources, is shown as far as the gateway holds it: complete is false, a resource the gateway never accepted is not listed, and one it still runs from an earlier version is listed with that version as its sourceVersion.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

What the gateway holds

AppliedConfiguration
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Compare a version with what a gateway holds​

GET /gateways/{id}/diff

Reports what applying the version would add, change and remove, without calling the gateway.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

versionquerystring

The version to compare, its hash, a prefix of at least seven of its characters, or latest. Defaults to latest.

Responses

CodeDescriptionSchema
200

The differences

Diff
400

The request was malformed, or a required field was missing

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Apply a configuration version to a gateway​

POST /gateways/{id}/apply

Writes a version to the gateway through its import API, presenting the gateway's key. Only what the gateway's master says it lacks or holds differently is sent, narrowed to selection when one is given and less what is held back. What the master records the gateway holds that the version no longer has is removed; a resource on the gateway that no apply recorded is never removed.

The gateway then holds the version, and the one it held before becomes what a revert returns it to. A dry run sends the import as a dry run and records nothing. The gateway's own account of the import is returned, including any resource it refused.

A version refers to variables and secrets by name rather than carrying their values, and the gateway holds the values. Before anything is sent, the gateway's store is asked for every name the version refers to. A dry run lists any it lacks in missing; an apply is refused with 409 until the gateway holds them all.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Request body: application/json

Schema: ApplyRequest

6 properties
NameTypeRequiredDescription
versionstring

The version to apply, its hash, a prefix of at least seven of its characters, or latest. Defaults to latest.

dryRunboolean

Send the import as a dry run and record nothing.

originstring

A label for where the version came from, such as the environment it was promoted from, recorded as given on each resource the apply writes (MasterEntry.origin). A promotion through the MCP promote_gateway tool gives the source gateway's id. Longer than 255 characters is refused with 400 (GTW-1035).

confirmRemovalsboolean

Lets the apply remove more resources from the gateway than gateway.removal_confirmation_threshold allows unconfirmed. Without it such an apply is refused with 409 (GTW-1030); a dry run shows the removals first.

selectionarray of string

The keys (Change.key) of the changes to apply in this apply. The other changes are neither written nor removed, and stay on offer to the next diff. Omitted, every change is applied except those held back (Change.heldBack); empty, none is. A key that names no change in the diff is refused with 400 (GTW-1025).

leaveOutarray of string

The keys of changes to leave out of this apply and the applies after it to this gateway, until a selection names them again. Each is offered by later diffs with heldBack set. A key that names no change in the diff, or one the selection also names, is refused with 400 (GTW-1025).

Responses

CodeDescriptionSchema
200

The result

ApplyResult
202

Another apply to the gateway is running, and this one asked for latest with nothing selected and nothing confirmed, so it was queued rather than done: the latest version at that time is applied once the running apply finishes, for the user who asked. A version named by its hash, or a confirmed apply, waits instead. A burst of applies queues at most one. An apply the queued run would refuse for its removals is refused now with 409. The queued run is best effort: it is not kept across a restart of the node running it, and its failure is logged rather than answered, so read the gateway's applied version to see what it holds.

ApplyResult
400

The request was malformed, the selection names a resource the diff does not report, or the origin is too long

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error
409

The gateway does not hold every value the version refers to (GTW-1017); the apply would remove more resources than gateway.removal_confirmation_threshold and was not confirmed (GTW-1030); another apply or revert to the gateway was still running after this one had waited as long as an import may take (GTW-1029); a capture removed the version before the apply could record it (GTW-1018); or another apply finished first (GTW-1019).

Error
502

The gateway could not be reached, or refused the request.

503

The apply took longer to prepare than its lease allows for an import, and sent nothing to the gateway (GTW-5003). Apply again.

Error

Revert a gateway to the version it held before​

POST /gateways/{id}/revert

Returns the gateway to the master it held before the version it holds now, which is that earlier version as far as the gateway held it: a version applied in part is returned to in part, and each resource keeps the version that sent it. What the current master records that the earlier one does not is removed. A gateway whose earlier master is no longer kept is returned to the earlier version whole. It goes back one step only: afterwards the gateway has no earlier version to revert to, and another revert is refused (GTW-1016) until a later apply. Like an apply, it is refused while the gateway lacks a value that version refers to.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Request body: application/json

Schema: RevertRequest

2 properties
NameTypeRequiredDescription
confirmRemovalsboolean

As on an apply. A revert to a much smaller version is the usual case.

dryRunboolean

Responses

CodeDescriptionSchema
200

The result

ApplyResult
400

The gateway holds no earlier version to revert to.

Error
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error
409

The gateway does not hold every value the version refers to (GTW-1017); the revert would remove more resources than gateway.removal_confirmation_threshold and was not confirmed (GTW-1030); or another apply or revert to the gateway was still running after this one had waited as long as an import may take (GTW-1029).

Error
502

The gateway could not be reached, or refused the request.

503

The apply took longer to prepare than its lease allows for an import, and sent nothing to the gateway (GTW-5003). Apply again.

Error

Get what a gateway holds, resource by resource​

GET /gateways/{id}/master

Returns the gateway's latest master: every resource deployed to it, as the gateway last accepted it, with how each one got there. A gateway nothing was applied to holds the empty master, number 0, with no entries or resources.

A gateway that applied a version before masters were recorded is given its first master, from that version, the first time any of the master routes reads it. That read writes the master once; every read after it only reads.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

The gateway's master

Master
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

List a gateway's masters​

GET /gateways/{id}/master/history

Lists the masters kept for the gateway, newest first, each with its summary but without entries or resources. As many are kept per gateway as versions are kept per deployment (gateway.max_versions). Like GET /gateways/{id}/master, the first read of a gateway that applied a version before masters were recorded writes its first master.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

The gateway's masters

array of Master
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered

Error

Get one resource's history on a gateway​

GET /gateways/{id}/master/resources/{type}/{resource}

Returns the resource's entry in each kept master that records it, newest first. Like GET /gateways/{id}/master, the first read of a gateway that applied a version before masters were recorded writes its first master.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

typepathstringYes

The resource type, the part of MasterEntry.key before the slash.

resourcepathstringYes

The resource's id, the part of MasterEntry.key after the slash.

Responses

CodeDescriptionSchema
200

The resource's history

ResourceHistory
401

No valid credentials were presented

Error
403

The caller is authenticated but not permitted

Error
404

No gateway of that id is registered (GTW-1002), or no kept master records the resource (GTW-1031).

Error

Gateway values​

A gateway's variables and secrets, held in the gateway's own store and managed through this control plane with the gateway's key.

List a gateway's variables​

GET /gateways/{id}/variables

Passed to the gateway's own GET /variables, presenting the gateway's key, with the query as given (limit, offset, names, filter). What the gateway returns is answered in the variable store API's shapes, and a call the gateway refuses is answered with the gateway's own status and error, unchanged. The same holds for every call to a gateway's values.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

The gateway's answer.

404

No gateway of that id is registered

Error
502

The gateway could not be reached.

Create a variable on a gateway​

POST /gateways/{id}/variables

Passed to the gateway's own POST /variables, and answered as the gateway answered.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Request body (required): application/json

Schema: object

Responses

CodeDescriptionSchema
201

The gateway's answer.

404

No gateway of that id is registered

Error
502

The gateway could not be reached.

Read a gateway's variable​

GET /gateways/{id}/variables/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Responses

CodeDescriptionSchema
200

The gateway's answer.

502

The gateway could not be reached.

Update a gateway's variable​

PUT /gateways/{id}/variables/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Request body (required): application/json

Schema: object

Responses

CodeDescriptionSchema
200

The gateway's answer.

201

The variable did not exist on the gateway, and was created.

502

The gateway could not be reached.

Delete a gateway's variable​

DEL /gateways/{id}/variables/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Responses

CodeDescriptionSchema
204

Deleted on the gateway.

502

The gateway could not be reached.

List a gateway's secrets​

GET /gateways/{id}/secrets

Passed to the gateway's own GET /secrets. As on the gateway, a secret's value is never returned: only its name and whether it is set.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Responses

CodeDescriptionSchema
200

The gateway's answer.

404

No gateway of that id is registered

Error
502

The gateway could not be reached.

Create a secret on a gateway​

POST /gateways/{id}/secrets

Passed to the gateway's own POST /secrets. The value is held only by the gateway; this plane does not store it.

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

Request body (required): application/json

Schema: object

Responses

CodeDescriptionSchema
201

The gateway's answer.

404

No gateway of that id is registered

Error
502

The gateway could not be reached.

Read whether a gateway holds a secret​

GET /gateways/{id}/secrets/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Responses

CodeDescriptionSchema
200

The gateway's answer, without the value.

502

The gateway could not be reached.

Replace a secret's value on a gateway​

PUT /gateways/{id}/secrets/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Request body (required): application/json

Schema: object

Responses

CodeDescriptionSchema
200

The gateway's answer.

201

The secret did not exist on the gateway, and was created.

502

The gateway could not be reached.

Delete a gateway's secret​

DEL /gateways/{id}/secrets/{name}

Scopes: system

Parameters

NameInTypeRequiredDescription
idpathstringYes

The gateway's id.

namepathstringYes

The variable's or secret's name on the gateway.

Responses

CodeDescriptionSchema
204

Deleted on the gateway.

502

The gateway could not be reached.

Schemas​

RegisterRequest​

Type: object

5 properties
NameTypeRequiredDescription
namestringYes

A label for this gateway, unique within the deployment.

baseUrlstringYes

Where the gateway answers, and what identifies it.

One gateway registers once, so this is unique within the deployment. A gateway reached by more than one name can therefore be registered more than once, under each of them; nothing here can tell they are the same deployment. Register the name the control plane should call it by.

keystring (password)

The token this control plane will present to that gateway.

Optional. Supply it when the gateway was configured with a key first and this registration has to match; leave it out and one is generated, which is the usual way and means a key is not typed, mailed or committed on the way in. Either way the response returns it, and that is the only time it is readable.

A gateway declared in a file may name one the same way. Write it as an environment reference there, key: "{{.GATEWAY_TOKEN}}", so the file carries the name and not the credential.

caCertificatestring

A PEM certificate to trust when calling this gateway, in addition to the system roots.

For a gateway serving a certificate no public authority signed, which is what a local or on-premise deployment usually has. Leave empty for a gateway behind an ingress with a publicly-issued certificate: it verifies against the system roots with nothing here.

isDefaultboolean

Makes this the default gateway. Its baseUrl is the one the console shows for an application's runtime endpoints.

At most one gateway is the default. If another already is, it gives that up to this one. The first gateway registered is the default whether or not this is set.

Default: false

UpdateRequest​

Type: object

What to change. Every property is optional and what is omitted keeps the value it already has, so a caller changing one field need not restate the others.

4 properties
NameTypeRequiredDescription
namestring

A label for this gateway, unique within the deployment.

baseUrlstring

Where the gateway answers.

caCertificatestring

A PEM certificate to trust when calling this gateway.

keystring (password)

The token this control plane presents to that gateway.

Omit it to keep the one already held. Sending a new value is how a credential is rotated, and the same value has to reach the gateway, which holds it as its management API key.

Registration​

Type: Gateway

A registration, and the key it issued.

The key appears here and nowhere else. It is generated when the gateway is registered, held encrypted, and never read back, so this response is the only chance to configure it on the gateway. Lose it and the way forward is to rotate, not to look it up.

8 properties
NameTypeRequiredDescription
idstring
namestring
baseUrlstring
caCertificatestring
isDefaultboolean

Whether this is the default gateway. At most one gateway is, and the first one registered becomes it. Omitted when false.

createdAtstring (date-time)
updatedAtstring (date-time)
keystring (password)Yes

The token this control plane will present to that gateway.

Gateway​

Type: object

A registered gateway. Carries no key property, so no read can disclose one.

7 properties
NameTypeRequiredDescription
idstring
namestring
baseUrlstring
caCertificatestring
isDefaultboolean

Whether this is the default gateway. At most one gateway is, and the first one registered becomes it. Omitted when false.

createdAtstring (date-time)
updatedAtstring (date-time)

AppliedConfiguration​

Type: object

6 properties
NameTypeRequiredDescription
gatewayIdstringYes
versionstring

The hash of the version recorded as applied. Absent when nothing was applied.

completeboolean

Whether the gateway holds that version whole. False while it is partly applied.

appliedAtstring (date-time)
resourcesarray of AppliedResourceYes
skippedarray of SkippedResource

The version's documents that cannot be shown as their resource.

AppliedResource​

Type: object

5 properties
NameTypeRequiredDescription
resourceTypestringYes

The resource type, as a version's document names it in resource_type.

idstringYes

The resource's id, or its name for a resource exported without one.

sourceVersionstring

The hash of the version the apply that wrote the resource sent it from.

resourceobjectYes

What the resource's own read returns.

partsobject

The collections the resource's own API serves apart from it, keyed by the path below the resource they are served at, each in the shape that path returns, as one page holding every item:

Resource typeParts
groupmembers
roleassignments
resource_serverresources (top level), actions, and for each resource resources/{resourceId}, resources/{resourceId}/resources (its children) and resources/{resourceId}/actions
translationns/{namespace} for each namespace

A version names a resource server's resources {resourceServerId}{delimiter}{path}, the actions of a resource {resourceServerId}{delimiter}{path}{delimiter}{handle}, and the actions of the resource server itself {resourceServerId}{delimiter}{handle}, since an export does not carry the ids this deployment gave them.

SkippedResource​

Type: object

4 properties
NameTypeRequiredDescription
resourceTypestringYes
idstring
codestringYes

GTW-1021 the resource type cannot be shown from a version; GTW-1022 the document does not read as its resource: it is not YAML as it stands, as a document captured with a template range is not until its values are filled in, or it does not read as the resource its type names.

reasonstringYes

AppliedVersion​

Type: object

11 properties
NameTypeRequiredDescription
gatewayIdstring
appliedVersionstring

The hash of the version the gateway holds. Omitted when nothing was applied.

previousVersionstring

The hash of the version a revert returns it to. Omitted when there is none: before a second apply, and after a revert.

appliedAtstring (date-time)
appliedByActor

The user who applied the version, or reverted the gateway to it. Left out when the user's name cannot be read.

appliedBy.idstringYes

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

appliedBy.namestringYes

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

completeboolean

Whether the gateway holds the version whole. An apply whose selection left changes out, or whose import the gateway refused in part, records the version as partly applied; the diff goes on offering the rest, and the apply that brings the gateway level with the version records it complete.

resourcesHeldinteger

How many of the version's resources the gateway holds as the version has them. Always given, so a version the gateway holds none of reads as 0; with nothing applied, both counts are 0.

resourcesTotalinteger

How many resources the version has. Always given.

masterstring

The hash of the master the apply left.

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.

ApplyRequest​

Type: object

6 properties
NameTypeRequiredDescription
versionstring

The version to apply, its hash, a prefix of at least seven of its characters, or latest. Defaults to latest.

dryRunboolean

Send the import as a dry run and record nothing.

originstring

A label for where the version came from, such as the environment it was promoted from, recorded as given on each resource the apply writes (MasterEntry.origin). A promotion through the MCP promote_gateway tool gives the source gateway's id. Longer than 255 characters is refused with 400 (GTW-1035).

confirmRemovalsboolean

Lets the apply remove more resources from the gateway than gateway.removal_confirmation_threshold allows unconfirmed. Without it such an apply is refused with 409 (GTW-1030); a dry run shows the removals first.

selectionarray of string

The keys (Change.key) of the changes to apply in this apply. The other changes are neither written nor removed, and stay on offer to the next diff. Omitted, every change is applied except those held back (Change.heldBack); empty, none is. A key that names no change in the diff is refused with 400 (GTW-1025).

leaveOutarray of string

The keys of changes to leave out of this apply and the applies after it to this gateway, until a selection names them again. Each is offered by later diffs with heldBack set. A key that names no change in the diff, or one the selection also names, is refused with 400 (GTW-1025).

RevertRequest​

Type: object

2 properties
NameTypeRequiredDescription
confirmRemovalsboolean

As on an apply. A revert to a much smaller version is the usual case.

dryRunboolean

Change​

Type: object

10 properties
NameTypeRequiredDescription
keystring

Names the resource in a selection, as its type and its id, or its name when it has none.

heldBackboolean

An earlier apply left this change out for the applies after it. An apply without a selection leaves it out again; one whose selection names it applies it and stops holding it back.

failedboolean

The gateway refused this resource on its last apply, so it is offered again.

selectedboolean

On an apply's answer, the apply sent this change.

valueChangedboolean

Offered as updated because a value the resource refers to was set on the gateway again since the last apply, although its document did not change.

resourceTypestring
idstring
namestring
changestring

Allowed values: added, updated, deleted, unchanged

linesarray of object

The resource's document diffed line by line, from what the gateway holds to what is applied. Omitted for an unchanged resource. Values appear as the references the version holds, never as the values themselves.

Diff​

Type: object

9 properties
NameTypeRequiredDescription
fromMasterstring

The hash of the gateway's master, what it holds. Omitted when it holds nothing.

toVersionstring

The hash of the version applied.

summaryobject

Counts the changes by kind.

summary.addedinteger
summary.updatedinteger
summary.deletedinteger
summary.unchangedinteger
changesarray of Change
misplacedSecretsarray of ValueReference

Where the version refers to a secret from a field that holds no credential. A gateway refuses such a resource on import, so put the field right and capture again. A capture refuses the configuration outright; this names what an earlier version still holds.

ApplyResult​

Type: object

17 properties
NameTypeRequiredDescription
gatewayIdstring
dryRunboolean
diffDiff
importobject

The gateway's own account of the import, as it answered.

recordedboolean

Whether the version is now recorded as applied to the gateway. A dry run never records. A selection that left changes out, or a resource the gateway refused to write or remove, which import names, does not stop it: the version is recorded as partly applied, and the next diff offers what the gateway lacks.

completeboolean

Whether the gateway holds the recorded version whole after the apply. Always present; false on a dry run, which records nothing.

masterstring

The hash of the master the gateway holds after the apply, which records each resource as the gateway accepted or refused it (see GET /gateways/{id}/master). A dry run writes none.

missingobject

Only on a dry run: the variables and secrets the version refers to that the gateway does not hold. An apply in that state is refused instead.

missing.variablesarray of string
missing.secretsarray of string
missing.referencesarray of ValueReference

Where the version refers to each missing value.

changedobject

The variables and secrets the version refers to whose values were set on the gateway again since the version it holds was applied, so a value changed outside any version is seen as it takes effect. It compares the time the gateway's store gives for each value with the time it gave at that apply, never with the control plane's clock. A value the control plane sent itself, such as one captured from a resource, is reported too. Names only, never values. Omitted when none changed or the gateway holds no version yet.

changed.variablesarray of string
changed.secretsarray of string
changed.referencesarray of ValueReference

Where the version refers to each changed value.

queuedboolean

Only with 202: another apply to the gateway was running, so the latest version was not applied now and will be applied once it finishes, by whichever node finishes it.

queuedVersionstring

With queued, the version that will be applied.

Master​

Type: object

What one gateway holds, resource by resource: every resource deployed to it, as the gateway last accepted it, with how each one got there. Each apply writes a new master and keeps the one before.

10 properties
NameTypeRequiredDescription
gatewayIdstring
numberinteger

Orders the gateway's masters, from 1; 0 is the empty master of a gateway nothing was applied to.

masterstring

The hash naming the master by what it holds. Omitted for the empty master.

createdAtstring (date-time)
createdByActor

The user whose apply wrote the master. 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

Every resource the gateway holds, one YAML document each, in the same form a version holds them. Left out by a listing, and when the gateway holds none.

summaryMasterSummary
entriesarray of MasterEntry

The manifest, one entry per resource key, sorted by key. Left out by a listing, and when there are none.

MasterSummary​

Type: object

3 properties
NameTypeRequiredDescription
deployedinteger
failedinteger
removedinteger

MasterEntry​

Type: object

13 properties
NameTypeRequiredDescription
keystring

The resource's key, <resourceType>/<id>, as a diff reports it.

resourceTypestring
idstring
namestring
contentHashstring

The SHA-256 of the document as the master holds it; none for a removed resource or one the gateway never accepted.

sourceVersionstring

The hash of the version the last apply of this resource sent it from.

originstring

The origin that apply gave, as given.

statestring

deployed for a resource the gateway accepted; failed for one it refused on its last apply, with failure; removed for one removed from the gateway, listed until something is deployed under its key again.

Allowed values: deployed, failed, removed

failureEntryFailure

What the gateway answered when it refused the resource.

atstring (date-time)

When the entry was last written.

byActor

The user whose apply last wrote the entry. Left out when the user's name cannot be read.

by.idstringYes

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

by.namestringYes

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

EntryFailure​

Type: object

What the gateway answered when it refused the resource.

3 properties
NameTypeRequiredDescription
codestring
messagestring
descriptionstring

What in the resource was refused, when the gateway said more than the message.

ResourceHistory​

Type: object

3 properties
NameTypeRequiredDescription
gatewayIdstring
keystring
historyarray of object

The resource's entry in each kept master that records it, newest first.

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?