Gateway API
Registers the gateways this control plane administers.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
clientCredentials flow, token URL /oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Manage 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
| Code | Description | Schema |
|---|---|---|
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
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A label for this gateway, unique within the deployment. |
baseUrl | string | Yes | 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. |
key | string (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, | |
caCertificate | string | 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. | |
isDefault | boolean | Makes this the default gateway. Its 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: |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Request body (required): application/json
Schema: UpdateRequest
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | A label for this gateway, unique within the deployment. | |
baseUrl | string | Where the gateway answers. | |
caCertificate | string | A PEM certificate to trust when calling this gateway. | |
key | string (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
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
version | query | string | The version to compare, its hash, a prefix of at least seven of its characters, or |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Request body: application/json
Schema: ApplyRequest
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
version | string | The version to apply, its hash, a prefix of at least seven of its characters, or | |
dryRun | boolean | Send the import as a dry run and record nothing. | |
origin | string | 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 ( | |
confirmRemovals | boolean | Lets the apply remove more resources from the gateway than | |
selection | array of string | The keys ( | |
leaveOut | array 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 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | The result | ApplyResult |
202 | Another apply to the gateway is running, and this one asked for | 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 ( | 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 ( | 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Request body: application/json
Schema: RevertRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
confirmRemovals | boolean | As on an apply. A revert to a much smaller version is the usual case. | |
dryRun | boolean |
Responses
| Code | Description | Schema |
|---|---|---|
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 ( | 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 ( | 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
type | path | string | Yes | The resource type, the part of |
resource | path | string | Yes | The resource's id, the part of |
Responses
| Code | Description | Schema |
|---|---|---|
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 ( | 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Request body (required): application/json
Schema: object
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Request body (required): application/json
Schema: object
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
Request body (required): application/json
Schema: object
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Request body (required): application/json
Schema: object
Responses
| Code | Description | Schema |
|---|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | Yes | The gateway's id. |
name | path | string | Yes | The variable's or secret's name on the gateway. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Deleted on the gateway. | |
502 | The gateway could not be reached. |
Schemas
RegisterRequest
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | string | Yes | A label for this gateway, unique within the deployment. |
baseUrl | string | Yes | 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. |
key | string (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, | |
caCertificate | string | 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. | |
isDefault | boolean | Makes this the default gateway. Its 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: |
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
| Name | Type | Required | Description |
|---|---|---|---|
name | string | A label for this gateway, unique within the deployment. | |
baseUrl | string | Where the gateway answers. | |
caCertificate | string | A PEM certificate to trust when calling this gateway. | |
key | string (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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ||
name | string | ||
baseUrl | string | ||
caCertificate | string | ||
isDefault | boolean | Whether this is the default gateway. At most one gateway is, and the first one registered becomes it. Omitted when false. | |
createdAt | string (date-time) | ||
updatedAt | string (date-time) | ||
key | string (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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | ||
name | string | ||
baseUrl | string | ||
caCertificate | string | ||
isDefault | boolean | Whether this is the default gateway. At most one gateway is, and the first one registered becomes it. Omitted when false. | |
createdAt | string (date-time) | ||
updatedAt | string (date-time) |
AppliedConfiguration
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
gatewayId | string | Yes | |
version | string | The hash of the version recorded as applied. Absent when nothing was applied. | |
complete | boolean | Whether the gateway holds that version whole. False while it is partly applied. | |
appliedAt | string (date-time) | ||
resources | array of AppliedResource | Yes | |
skipped | array of SkippedResource | The version's documents that cannot be shown as their resource. |
AppliedResource
Type: object
5 properties
| Name | Type | Required | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resourceType | string | Yes | The resource type, as a version's document names it in | ||||||||||
id | string | Yes | The resource's id, or its name for a resource exported without one. | ||||||||||
sourceVersion | string | The hash of the version the apply that wrote the resource sent it from. | |||||||||||
resource | object | Yes | What the resource's own read returns. | ||||||||||
parts | object | 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:
A version names a resource server's resources |
SkippedResource
Type: object
4 properties
| Name | Type | Required | Description |
|---|---|---|---|
resourceType | string | Yes | |
id | string | ||
code | string | Yes |
|
reason | string | Yes |
AppliedVersion
Type: object
11 properties
| Name | Type | Required | Description |
|---|---|---|---|
gatewayId | string | ||
appliedVersion | string | The hash of the version the gateway holds. Omitted when nothing was applied. | |
previousVersion | string | The hash of the version a revert returns it to. Omitted when there is none: before a second apply, and after a revert. | |
appliedAt | string (date-time) | ||
appliedBy | Actor | The user who applied the version, or reverted the gateway to it. Left out when the user's name cannot be read. | |
appliedBy.id | string | Yes | The token's |
appliedBy.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. |
complete | boolean | 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. | |
resourcesHeld | integer | 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 | |
resourcesTotal | integer | How many resources the version has. Always given. | |
master | string | 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
| 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. |
ApplyRequest
Type: object
6 properties
| Name | Type | Required | Description |
|---|---|---|---|
version | string | The version to apply, its hash, a prefix of at least seven of its characters, or | |
dryRun | boolean | Send the import as a dry run and record nothing. | |
origin | string | 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 ( | |
confirmRemovals | boolean | Lets the apply remove more resources from the gateway than | |
selection | array of string | The keys ( | |
leaveOut | array 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 |
RevertRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
confirmRemovals | boolean | As on an apply. A revert to a much smaller version is the usual case. | |
dryRun | boolean |
Change
Type: object
10 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | Names the resource in a selection, as its type and its id, or its name when it has none. | |
heldBack | boolean | 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. | |
failed | boolean | The gateway refused this resource on its last apply, so it is offered again. | |
selected | boolean | On an apply's answer, the apply sent this change. | |
valueChanged | boolean | 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. | |
resourceType | string | ||
id | string | ||
name | string | ||
change | string | Allowed values: | |
lines | array 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
| Name | Type | Required | Description |
|---|---|---|---|
fromMaster | string | The hash of the gateway's master, what it holds. Omitted when it holds nothing. | |
toVersion | string | The hash of the version applied. | |
summary | object | Counts the changes by kind. | |
summary.added | integer | ||
summary.updated | integer | ||
summary.deleted | integer | ||
summary.unchanged | integer | ||
changes | array of Change | ||
misplacedSecrets | array 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
| Name | Type | Required | Description |
|---|---|---|---|
gatewayId | string | ||
dryRun | boolean | ||
diff | Diff | ||
import | object | The gateway's own account of the import, as it answered. | |
recorded | boolean | 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 | |
complete | boolean | Whether the gateway holds the recorded version whole after the apply. Always present; | |
master | string | The hash of the master the gateway holds after the apply, which records each resource as
the gateway accepted or refused it (see | |
missing | object | 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.variables | array of string | ||
missing.secrets | array of string | ||
missing.references | array of ValueReference | Where the version refers to each missing value. | |
changed | object | 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.variables | array of string | ||
changed.secrets | array of string | ||
changed.references | array of ValueReference | Where the version refers to each changed value. | |
queued | boolean | Only with | |
queuedVersion | string | With |
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
| Name | Type | Required | Description |
|---|---|---|---|
gatewayId | string | ||
number | integer | Orders the gateway's masters, from 1; 0 is the empty master of a gateway nothing was applied to. | |
master | string | The hash naming the master by what it holds. Omitted for the empty master. | |
createdAt | string (date-time) | ||
createdBy | Actor | The user whose apply wrote the master. 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 | 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. | |
summary | MasterSummary | ||
entries | array 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
| Name | Type | Required | Description |
|---|---|---|---|
deployed | integer | ||
failed | integer | ||
removed | integer |
MasterEntry
Type: object
13 properties
| Name | Type | Required | Description |
|---|---|---|---|
key | string | The resource's key, | |
resourceType | string | ||
id | string | ||
name | string | ||
contentHash | string | The SHA-256 of the document as the master holds it; none for a removed resource or one the gateway never accepted. | |
sourceVersion | string | The hash of the version the last apply of this resource sent it from. | |
origin | string | The | |
state | string |
Allowed values: | |
failure | EntryFailure | What the gateway answered when it refused the resource. | |
at | string (date-time) | When the entry was last written. | |
by | Actor | The user whose apply last wrote the entry. Left out when the user's name cannot be read. | |
by.id | string | Yes | The token's |
by.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. |
EntryFailure
Type: object
What the gateway answered when it refused the resource.
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | ||
message | string | ||
description | string | What in the resource was refused, when the gateway said more than the message. |
ResourceHistory
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
gatewayId | string | ||
key | string | ||
history | array 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
| 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?