Server-API: settings
Als Markdown kopierenDiese Routen liegen auf der Server-API, Port 21114 (21121 in Docker). Sie nehmen einen API-Schlüssel in X-API-Key oder ein Anmelde-Token; siehe Die HTTP-API. Die Beschreibungen stehen auf Englisch, wie in der OpenAPI-Beschreibung.
Single settings in the server API's settings table, read and written by key.
Read one stored server setting by its key.
Reads the key from the server_config table. A key that isn't stored answers an empty value. Keys that hold a secret (the token signing secret, the API key, private keys, and keys containing password, secret or private) answer 403.
On the server API, port 21114. Needs server.config.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
key |
path | string | yes | The setting key: 1 to 64 letters, digits, underscores, hyphens or dots |
200: Done (application/json)
| Field | Type | Required | What it is |
|---|---|---|---|
key |
string | yes | |
value |
string | yes | The stored value, empty when the key is not set |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The account may not do this, or the key holds a secret |
Store one server setting by its key.
Writes the value to the server_config table as it is, with no check of the key's meaning, and logs the change in the audit log. Keys that hold a secret answer 403. A setting takes effect only where the server reads it again.
On the server API, port 21114. Needs server.config.
| Parameter | In | Type | Required | What it is |
|---|---|---|---|---|
key |
path | string | yes | The setting key: 1 to 64 letters, digits, underscores, hyphens or dots |
Request body, application/json:
| Field | Type | What it is |
|---|---|---|
value |
string | The value to store |
200: Done (application/json)
| Field | Type | Required |
|---|---|---|
status |
"ok" |
yes |
key |
string | yes |
| Error | When |
|---|---|
| 400 | The request is not valid |
| 401 | No credential, or one that is not valid |
| 403 | The account may not do this, or the key holds a secret |