Skip to content

Enable (adopt) or disable a handler for this user

POST
/api/v1/admin/handlers/set-enabled
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>'
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

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"
}