Skip to content

Generate a new self-signed certificate, replacing whatever is being served.

POST
/api/v1/settings/tls/regenerate
curl --request POST \
--url https://example.com/api/v1/settings/tls/regenerate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "names": [ "example" ] }'
Media typeapplication/json

Which names a regenerated self-signed certificate should cover.

object
names

Hostnames and IP addresses to put in the subject alternative name. If empty, the deployment’s defaults are used — loopback plus the server’s own hostname, which is rarely the address browsers actually use.

Array<string>
Examplegenerated
{
"names": [
"example"
]
}

Generated and live; the body is the new certificate’s details

Media typeapplication/json

The WebUI’s TLS certificate, plus one fact about how this deployment is exposed.

object
api_port_is_public
required

Whether Yagra’s API port is reachable beyond the server itself. When true, the API is also available over plain HTTP on that port, so the encrypted WebUI is not the only way in.

boolean
config
One of:
null
Example
{
"config": {
"source": "self_signed"
}
}

A supplied name is not a usable hostname or IP address

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role lacks the manage-configuration permission

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

This deployment has no certificate store

Media typeapplication/json

The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies undescribed — a client that has to guess the failure shape ends up parsing the success shape and reading undefined.

object
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}