Enable (adopt) or disable a handler for this user
POST
/api/v1/admin/handlers/set-enabled
const url = 'http://localhost:11044/api/v1/admin/handlers/set-enabled?name=example&enabled=true';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
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/admin/handlers/set-enabled?name=example&enabled=true' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”name
required
string
Name of the handler, as listed by POST /admin/handlers/list. Not checked against the world: an unknown name is recorded as an override all the same and reported as set
enabled
required
boolean
true adopts the handler so it fires, false stops it firing. Recorded as this user’s override, keeping any per-user schedule, and the world is refreshed so schedules re-sync
Responses
Section titled “Responses”The firing state now in force
Media typeapplication/json
Acknowledgement of an enable/disable, echoing the state now in force.
object
enabled
required
The firing state the request set, echoed back.
boolean
name
required
The handler the request named.
string
ok
required
Always true. It does not confirm that a handler of that name exists.
boolean
Example generated
{ "enabled": true, "name": "example", "ok": true}No authenticated principal
Media typeapplication/json
A refusal carrying only a human-readable reason.
object
error
required
What went wrong, in the terms the caller can act on.
string
Example generated
{ "error": "example"}
