Generate a new self-signed certificate, replacing whatever is being served.
const url = 'https://example.com/api/v1/settings/tls/regenerate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"names":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/settings/tls/regenerate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "names": [ "example" ] }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Which names a regenerated self-signed certificate should cover.
object
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.
Examplegenerated
{ "names": [ "example" ]}Responses
Section titled “Responses”Generated and live; the body is the new certificate’s details
The WebUI’s TLS certificate, plus one fact about how this deployment is exposed.
object
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.
The certificate being served, or null if none has been established yet.
object
The certificate chain in PEM, leaf first. Safe to distribute — this is what a client would
add to a trust store or pass to curl --cacert.
Days until expiry; negative once it has passed.
Lowercase hex SHA-256 of the certificate, matching what a browser displays.
When this certificate was imported or generated, RFC 3339.
The account that imported it, if it was imported by a signed-in user.
Distinguished name of the issuer. Equal to subject for a self-signed certificate.
Key type and size, for example RSA-2048 or ECDSA P-256.
Whether the private key can still be decrypted. false means the encryption key has changed
or been lost: the certificate cannot be served or renewed until it is imported again.
Whether the web server is currently serving this certificate. false means it is stored but
has not reached the web container yet.
End of the validity window, RFC 3339.
Start of the validity window, RFC 3339.
The hostnames and IP addresses this certificate is valid for.
Where a certificate came from, and therefore whether core may replace it on its own.
Distinguished name of the certificate’s subject.
Example
{ "config": { "source": "self_signed" }}A supplied name is not a usable hostname or IP address
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks the manage-configuration permission
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}This deployment has no certificate store
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
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}