`PUT /api/resources/{id}` — update name / config / secret. Each field is optional; an absent field is left alone. `secret = ""` clears the stored secret, `secret = "..."` overwrites it, `secret` absent leaves it intact.
PUT
/api/resources/{id}
const url = 'https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '{"config":"example","name":"example","secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/resources/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --data '{ "config": "example", "name": "example", "secret": "example" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
config
name
string | null
secret
Three-state per the service contract:
- field absent /
null→ leave the stored secret alone. - non-empty string → overwrite the secret in vault.
- empty string → clear the stored secret.
string | null
Examplegenerated
{ "config": "example", "name": "example", "secret": "example"}Responses
Section titled “Responses”Media typeapplication/json
What every HTTP handler returns — a resource row without secret material.
The DB row already redacts secret_vault_path via #[serde(skip)]; this
DTO mirrors the wire shape so external callers see the same fields they
can supply on create.
object
config
required
created_at
required
string format: date-time
has_secret
required
true iff a secret is stored for this resource — useful to the UI
for an “update secret” toggle, without ever leaking the secret itself.
boolean
id
required
string format: uuid
kind
required
string
last_test_ok
#358: the result of that last probe (Some(true)/Some(false)/None).
boolean | null
last_tested_at
#358: when the last test-connection probe ran (None = never tested).
string | null format: date-time
max_concurrent_uses
Issue #110: per-resource concurrency cap; None = unlimited.
integer | null format: int32
name
required
string
updated_at
required
string format: date-time
workspace_id
required
string format: uuid
Examplegenerated
{ "config": "example", "created_at": "2026-04-15T12:00:00Z", "has_secret": true, "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "kind": "example", "last_test_ok": true, "last_tested_at": "2026-04-15T12:00:00Z", "max_concurrent_uses": 1, "name": "example", "updated_at": "2026-04-15T12:00:00Z", "workspace_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}