Stop every agent in your world
const url = 'http://localhost:11044/api/v1/halt';const options = { method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>', 'Content-Type': 'application/json'}, body: '{"reason":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/halt \ --header 'Content-Type: application/json' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \ --data '{ "reason": "example" }'Every routine and duty is off from the next tick, and a run already going is refused its writes. Lifting the halt restores every stage.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”reason, optional, says why everything is being stopped and is shown with the halt to whoever reads it later; send {} to halt without one
Why every agent is being stopped, kept with the halt for whoever reads it later; sent to POST /halt
object
The reason, trimmed; null, absent or blank records none
Example generated
{ "reason": "example"}Responses
Section titled “Responses”Halted
Whether every agent in the caller’s world is stopped, and by whom; answered by GET, POST and DELETE /halt
object
When the halt began, ISO-8601 instant; null when it is not halted
Username of whoever halted the world; null when it is not halted
True while the halt is in force: no routine or duty fires and a run already going is refused its writes
The reason given for the halt; null when it is not halted or none was given
Example generated
{ "at": "example", "by": "example", "halted": true, "reason": "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"}No world

