Clear a broker connection's stored credential.
curl --request DELETE \ --url http://localhost:3001/admin/broker-connections/string/credentials \ --header 'Authorization: Bearer <token>'import requests
url = "http://localhost:3001/admin/broker-connections/string/credentials"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.json())use std::str::FromStr;use reqwest;
#[tokio::main]pub async fn main() { let url = "http://localhost:3001/admin/broker-connections/string/credentials";
let mut headers = reqwest::header::HeaderMap::new(); headers.insert("Authorization", "Bearer <token>".parse().unwrap());
let client = reqwest::Client::new(); let response = client.request(reqwest::Method::from_str("DELETE").unwrap(), url) .headers(headers) .send() .await;
let results = response.unwrap() .json::<serde_json::Value>() .await .unwrap();
dbg!(results);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Broker connection code
Responses
Section titled “Responses”Cleared and reloaded — now unconfigured
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
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
A display-only preview of a withheld value (see masked). Never a
value the client may send back.
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.
The reason a stored blob could not be used — set only when
state == "error", and always a description, never the payload.
“configured” | “unconfigured” | “error”
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