Skip to content

Clear a broker connection's stored credential.

DELETE
/admin/broker-connections/{code}/credentials
curl --request DELETE \
--url http://localhost:3001/admin/broker-connections/string/credentials \
--header 'Authorization: Bearer <token>'

Also reloads: leaving a removed credential’s adapter live would be the silent-mismatch class this project has hit repeatedly (see reload.rs’s module doc). The reload’s own outcome is not carried in the response — unlike the save path, there is nothing to test or report other than “unconfigured”, which redacted.state already says.

code
required
string

Broker connection code

Cleared and reloaded — now unconfigured

Media typeapplication/json

The credential view safe to put on the wire. state mirrors CredentialState so the cockpit can tell “needs setup” (unconfigured) apart from “stored but the master key does not open it” (error) — the distinction the whole credential store was built to preserve; collapsing them would invite an operator to re-enter a credential that is already there instead of fixing the key. fields is populated only when state is "configured"; message only when state is "error". Never carries a decrypted secret, in either state.

object
code
required
string
fields
required
Array<object>

One field of a credential as it may be shown on the wire. Named so the UI always knows the field exists — even when value is withheld — and can render a “leave blank to keep” input rather than an empty box that looks like the value was lost. secret is carried explicitly rather than left for a caller to infer from value.is_none(), so a future field that is merely absent (not secret) cannot be mistaken for one that is withheld.

object
hint

A display-only preview of a withheld value (see masked). Never a value the client may send back.

string
nullable
name
required
string
secret
required
boolean
value

The stored value, when it is safe to echo and safe to submit back unchanged. None for both secrets and masked identifiers — in either case the cockpit must leave the input blank, so that an untouched field submits empty and the merge rule keeps what is stored.

string
nullable
message

The reason a stored blob could not be used — set only when state == "error", and always a description, never the payload.

string
nullable
state
required

“configured” | “unconfigured” | “error”

string
updated_at
string format: date-time
nullable

Example generated

{
"code": "example",
"fields": [
{
"hint": "example",
"name": "example",
"secret": true,
"value": "example"
}
],
"message": "example",
"state": "example",
"updated_at": "2026-04-15T12:00:00Z"
}

Not found

The credential store could not be read, the master key is invalid, or the reload failed