Skip to content

Set or clear a per-user cron schedule for a handler

POST
/api/v1/admin/handlers/set-schedule
curl --request POST \
--url 'http://localhost:11044/api/v1/admin/handlers/set-schedule?name=example' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'
name
required
string

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

schedule
string

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

The schedule now in force, or null when cleared

Media typeapplication/json

Acknowledgement of a schedule change, echoing the schedule now in force.

object
name
required

The handler the request named.

string
ok
required

Always true. It does not confirm that a handler of that name exists.

boolean
schedule

The cron expression now in force, or null when the schedule was cleared.

string

Example generated

{
"name": "example",
"ok": true,
"schedule": "example"
}

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