Set or clear a per-user cron schedule for a handler
const url = 'http://localhost:11044/api/v1/admin/handlers/set-schedule?name=example';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-schedule?name=example' \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Name of the handler to schedule, as listed by POST /admin/handlers/list. Not checked against the world: an unknown name is recorded and reported as set
Spring 6-field cron expression (seconds minutes hours day-of-month month day-of-week) recorded as this user’s schedule for the handler; not validated here. Optional: omitted or blank clears the per-user schedule, keeping the handler’s enabled state
Responses
Section titled “Responses”The schedule now in force, or null when cleared
Acknowledgement of a schedule change, echoing the schedule now in force.
object
The handler the request named.
Always true. It does not confirm that a handler of that name exists.
The cron expression now in force, or null when the schedule was cleared.
Example generated
{ "name": "example", "ok": true, "schedule": "example"}No authenticated principal
A refusal carrying only a human-readable reason.
object
What went wrong, in the terms the caller can act on.
Example generated
{ "error": "example"}
