Keep an agent's own value for a secret
const url = 'http://localhost:11044/api/v1/agents/example/accounts/example';const options = { method: 'PUT', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"value":"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 http://localhost:11044/api/v1/agents/example/accounts/example \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "value": "example" }'Sent instead of its sponsor’s on an API where the agent’s identity is own-account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The agent’s name
The secret’s name, as the realm’s key declares it
Request Bodyrequired
Section titled “Request Bodyrequired”value is the agent’s own credential for this secret, kept as an API key in the caller’s wallet and sent instead of the sponsor’s; it replaces any value the agent already had, and is never returned
The agent’s own value for a secret, sent to PUT /agents/{name}/accounts/{secret}
object
The secret value itself, kept as an API key and sent instead of the sponsor’s on an own-account API; never returned
Example generated
{ "value": "example"}Responses
Section titled “Responses”The secrets it now has its own value for
The secrets an agent keeps its own value for, by name only; answered by the /agents/{name}/accounts endpoints
object
Name of the agent
Names of the secrets the agent has its own value for, as the realm’s keys declare them, sorted; the values are never returned
Example generated
{ "agent": "example", "secrets": [ "example" ]}No authenticated principal
A refusal with a machine-readable code and a plain-language message. ApiErrorAdvice answers it for a failed validation, a missing resource or a conflicting state, and some controllers answer it directly
object
Machine-readable key to branch on, such as validation_failed, unknown_field, not_found or conflict. Open: a surface may answer codes of its own
Extra context where there is some, such as the fields a body may carry; null otherwise
A plain-language explanation, written to be shown. Never carries an exception message
The body the servlet error dispatch answers for a status raised by an exception rather than written by the endpoint. Every failure except 404, which answers the not-found HTML page
object
The status’s standard reason phrase, such as Bad Request or Forbidden
The request path that failed
The HTTP status code, repeated from the status line
Example generated
{ "code": "example", "detail": "example", "message": "example"}
