Variable Store API
Named values this deployment holds, for configuration to refer to instead of carrying inline.
Download the OpenAPI definition (YAML)
Security schemes
OAuth2: oauth2
authorizationCode flow, token URL https://localhost:8090/oauth2/token, authorization URL https://localhost:8090/oauth2/authorize
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
clientCredentials flow, token URL https://localhost:8090/oauth2/token
1 scopes
| Scope | Description |
|---|---|
system | Access to system management APIs |
Variables
Named values whose contents can be read back.
List variables
GET /variables
Returns variables with their values, in ascending name order, paginated.
Narrow the result either by naming exactly what you want with names, or by matching with
filter. Using both applies both.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | Maximum number of records to return. Must be between 1 and 100 inclusive. Default: | |
offset | query | integer | Number of records to skip for pagination. Must be a non-negative integer. Default: | |
names | query | array of EntryName | Return only these names, comma separated. For fetching a known set in one call rather than one request per name. A name with nothing stored is simply absent from the result; asking for a name that does not exist is not an error, because the caller is asking which of these exist. | |
filter | query | string | Filter by name. Supported operators: The expression grammar is the one used across the APIs, but only a single clause is accepted
here: there is one filterable attribute, so joining clauses with
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | List of variables | VariableListResponse |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Add a variable
POST /variables
Fails with 409 when a variable of that name already exists. Use PUT /variables/{name} to
create or replace without caring which it is.
Scopes: system
Request body (required): application/json
Schema: VariableRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
value | string | Yes | |
description | string |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Variable created | Variable |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
409 | Something of that name already exists in this collection | Error |
500 | The store could not serve the request | Error |
Get a variable
GET /variables/{name}
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | The variable, with its value | Variable |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
404 | Nothing of that name is stored | Error |
500 | The store could not serve the request | Error |
Create or replace a variable
PUT /variables/{name}
Idempotent: the same request twice leaves the same state. Creates when the name is unused, replaces the value and description when it is.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Request body (required): application/json
Schema: VariableUpdateRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | |
description | string |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Variable replaced | Variable |
201 | Variable created | Variable |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Delete a variable
DEL /variables/{name}
Succeeds whether or not the variable existed, so a caller cleaning up does not have to ask first. Configuration still referring to the name will fail to resolve it.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Variable deleted, or there was none | |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Secrets
Named credentials, encrypted at rest. A read reports only whether one is held.
List secrets
GET /secrets
Returns the names this deployment holds a secret for, in ascending name order, paginated. No value is ever returned, by this or any other endpoint: a secret is written and referenced, never read back.
Narrow the result with names or filter, the same way as variables.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | Maximum number of records to return. Must be between 1 and 100 inclusive. Default: | |
offset | query | integer | Number of records to skip for pagination. Must be a non-negative integer. Default: | |
names | query | array of EntryName | Return only these names, comma separated. For fetching a known set in one call rather than one request per name. A name with nothing stored is simply absent from the result; asking for a name that does not exist is not an error, because the caller is asking which of these exist. | |
filter | query | string | Filter by name. Supported operators: The expression grammar is the one used across the APIs, but only a single clause is accepted
here: there is one filterable attribute, so joining clauses with
|
Responses
| Code | Description | Schema |
|---|---|---|
200 | The secrets held. Every entry reports | SecretListResponse |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Add a secret
POST /secrets
The value is encrypted before it is stored and is not returned here or anywhere else. Fails
with 409 when a secret of that name already exists; use PUT /secrets/{name} to set a value
without caring whether one is already held.
Scopes: system
Request body (required): application/json
Schema: SecretRequest
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
value | string | Yes | Encrypted before it is stored, and never returned. |
description | string |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Secret stored. The response reports that it is held, not what it is. | Secret |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
409 | Something of that name already exists in this collection | Error |
500 | The store could not serve the request | Error |
Check whether a secret is held
GET /secrets/{name}
Reports whether this deployment holds a secret of that name. The value is never returned.
A name with no secret is a 404 rather than exists: false, so that "is it there?" is
answered the same way as for every other resource in this API.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Responses
| Code | Description | Schema |
|---|---|---|
200 | A secret of that name is held | Secret |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
404 | Nothing of that name is stored | Error |
500 | The store could not serve the request | Error |
Set or replace a secret
PUT /secrets/{name}
Idempotent. Creates when no secret of that name is held, replaces the value when one is. Replacing is how a credential is rotated; the previous value is not recoverable.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Request body (required): application/json
Schema: SecretUpdateRequest
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | |
description | string |
Responses
| Code | Description | Schema |
|---|---|---|
200 | Secret replaced | Secret |
201 | Secret stored | Secret |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Delete a secret
DEL /secrets/{name}
Succeeds whether or not a secret of that name was held. Configuration still referring to the name will fail to resolve it.
Scopes: system
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
name | path | EntryName | Yes | The name of the variable or secret. Names are the identifier here: there is no separate id, because the whole purpose of the store is lookup by name. |
Responses
| Code | Description | Schema |
|---|---|---|
204 | Secret deleted, or there was none | |
400 | The request was malformed, or a name or value failed validation | Error |
401 | No valid credentials were presented | Error |
403 | The caller is authenticated but not permitted | Error |
500 | The store could not serve the request | Error |
Schemas
EntryName
Type: string
Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong.
Variable
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
value | string | Yes | The value. Returned in full, which is what makes this a variable and not a secret. |
description | string | What this value is for, for whoever reads the list later. | |
createdAt | string (date-time) | ||
updatedAt | string (date-time) |
VariableRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
value | string | Yes | |
description | string |
VariableUpdateRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | |
description | string |
Secret
Type: object
5 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
exists | boolean | Yes | Whether a secret of this name is held. There is deliberately no |
description | string | ||
createdAt | string (date-time) | ||
updatedAt | string (date-time) | When the value was last set, which is how a caller tells a rotation happened. |
SecretRequest
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
name | EntryName | Yes | Letters, digits and underscores, not starting with a digit. Constrained because these names are substituted into configuration as template variables, where a name that needs escaping is a name that will eventually be got wrong. |
value | string | Yes | Encrypted before it is stored, and never returned. |
description | string |
SecretUpdateRequest
Type: object
2 properties
| Name | Type | Required | Description |
|---|---|---|---|
value | string | Yes | |
description | string |
VariableListResponse
Type: object
SecretListResponse
Type: object
Error
Type: object
3 properties
| Name | Type | Required | Description |
|---|---|---|---|
code | string | Yes | Error code. The prefix identifies the service that produced the error; VAR for the variable store. |
message | I18nMessage | Yes | |
description | I18nMessage |
Was this page helpful?