Report whether every stored credential can still be decrypted.
const url = 'https://example.com/api/v1/credentials/health';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/v1/credentials/health \ --header 'Authorization: Bearer <token>'This is the check a restore cannot skip. A database can come back whole — right row counts,
healthy API — while the key-encryption key is a different one, in which case every credential is
permanently unreadable and nothing says so until the next poll fails. scripts/yagra-restore-verify.sh
asserts on this endpoint for exactly that reason, and it is worth looking at after any KEK
rotation or restore.
It decrypts in memory and reports booleans; no secret value crosses this boundary.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Per-credential decryptability. failures is empty on a healthy deployment
Whether the stored credentials can actually be decrypted with the KEK this process loaded.
object
How many of them the current key opened successfully.
The ones that failed, if any. A non-empty list means polling with those credentials will fail until the correct key file is restored.
A credential the current KEK cannot open. Carries identity only — never a length, a key_id,
or anything derived from the ciphertext.
object
How many credentials are stored.
Examplegenerated
{ "decryptable": 1, "failures": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "name": "example" } ], "total": 1}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 ManageCredentials
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" }}Credential storage is unavailable (skeleton mode)
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" }}