MethodPathDescription
PUT/v1/cluster/update_certUpdate a cluster certificate

Update cluster certificate

PUT /v1/cluster/update_cert

Replaces an existing certificate on all nodes within the cluster with a new certificate. The new certificate must pass validation before it can replace the old certificate.

See the certificates table for the list of cluster certificates and their descriptions.

Request

Example HTTP request

PUT /cluster/update_cert

Example JSON body

{
    "name": "certificate1",
    "key": "-----BEGIN RSA PRIVATE KEY-----\n[key_content]\n-----END RSA PRIVATE KEY-----",
    "certificate": "-----BEGIN CERTIFICATE-----\n[cert_content]\n-----END CERTIFICATE-----",
}

Replace [key_content] with the content of the private key and [cert_content] with the content of the certificate.

Response

Responds with the 200 OK status code if the certificate replacement succeeds across the entire cluster.

Otherwise, retry the certificate update in case the failure was due to a temporary issue in the cluster.

Status codes

CodeDescription
200 OKNo error
400 Bad RequestFailed, invalid certificate.
403 ForbiddenFailed, unknown certificate.
404 Not FoundFailed, invalid certificate.
406 Not AcceptableFailed, expired certificate.
409 ConflictFailed, not all nodes have been updated.