Update a schedule. Recomputes `next_run_at` from the new cadence, so an edit takes effect at the next fire rather than at the old one.
const url = 'https://example.com/api/v1/reports/schedules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"at_hour":1,"at_minute":1,"channel_ids":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"],"day_of_month":1,"day_of_week":1,"days_of_week":[1],"definition_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","enabled":true,"frequency":"example","message_language":"en","time_zone":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/v1/reports/schedules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "at_hour": 1, "at_minute": 1, "channel_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ], "day_of_month": 1, "day_of_week": 1, "days_of_week": [ 1 ], "definition_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "enabled": true, "frequency": "example", "message_language": "en", "time_zone": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Report schedule id
Request Bodyrequired
Section titled “Request Bodyrequired”Create/update body for a schedule (preset cadence).
object
The notification channels (webhook or email) a scheduled run is sent to (ADR-279). Absent leaves them as they are. Changing them needs ManageSystem: they decide what leaves the deployment.
The one day a weekly schedule fires on, 0=Sun … 6=Sat; used when days_of_week is absent.
The weekdays a daily schedule runs on, 0=Sun … 6=Sat (ADR-279); the other days are
skipped, and absent or all seven is every day. An empty list is 400. Given for a weekly
schedule, its first day is the one day it fires on.
The IANA zone the day and time are a wall time in. Absent or null means UTC.
Responses
Section titled “Responses”Schedule updated and next_run_at recomputed
{"ok": true} — the body of a successful mutation that has nothing else to say.
object
Examplegenerated
{ "ok": true}frequency is not daily|weekly|monthly, days_of_week is empty, or more than 20 channels
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No valid bearer token
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Role lacks ManageConfig, or changes the channels without ManageSystem
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}No such schedule
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Skeleton mode: no write side
The ADR-019 envelope every failure renders as. pub(crate) and schema-bearing so the OpenAPI
document can name one error shape for every endpoint (ADR-035) instead of leaving 4xx/5xx bodies
undescribed — a client that has to guess the failure shape ends up parsing the success shape and
reading undefined.
object
object
Stable machine-readable code. Clients branch on this, never on the message.
Operator-facing sentence. Safe to display; never carries an internal error’s own text.
Examplegenerated
{ "error": { "code": "example", "message": "example" }}