コンテンツにスキップ

Update a schedule. Recomputes `next_run_at` from the new cadence, so an edit takes effect at the next matching instant rather than whenever the old one happened to be.

PUT
/api/v1/analysis/schedules/{id}
curl --request PUT \
--url https://example.com/api/v1/analysis/schedules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "at_hour": 1, "at_minute": 1, "baseline_secs": 1, "day_of_month": 1, "day_of_week": 1, "depth": "example", "enabled": true, "family": "example", "frequency": "example", "notify": true, "scope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "scope_kind": "example", "scope_label": "example", "sensitivity": 1, "tool": "example", "window_secs": 1 }'
id
required
string format: uuid

Analysis schedule id

Media typeapplication/json

Create/update body for an analysis schedule: the launch spec plus the cadence.

object
at_hour
required
integer format: int32
at_minute
required
integer format: int32
baseline_secs
integer | null format: int64
day_of_month

1 … 28. Read only for monthly.

integer | null format: int32
day_of_week

0=Sun … 6=Sat. Read only for weekly.

integer | null format: int32
depth
string | null
enabled

Defaults to enabled.

boolean | null
family
string | null
frequency
required

daily | weekly | monthly.

string
notify

Whether a completed run may notify. Defaults to false — a schedule fires unattended, so silence is the safer default; the manual launch path defaults it on because someone is waiting for that run.

boolean | null
scope_id
string | null format: uuid
scope_kind
required

all | group | node.

string
scope_label
required
string
sensitivity
number | null format: double
tool
required

Which diagnostic to run (an AnalysisTool token, e.g. anomaly).

string
window_secs
required
integer format: int64
Examplegenerated
{
"at_hour": 1,
"at_minute": 1,
"baseline_secs": 1,
"day_of_month": 1,
"day_of_week": 1,
"depth": "example",
"enabled": true,
"family": "example",
"frequency": "example",
"notify": true,
"scope_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"scope_kind": "example",
"scope_label": "example",
"sensitivity": 1,
"tool": "example",
"window_secs": 1
}

Schedule updated

Unknown tool or cadence, a group/node scope with no scope_id, or a flow analysis on a deployment with no flow store

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No valid bearer token

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

Role below Operator, or a fleet-wide schedule from a group-scoped account

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

No such schedule, or it is outside the caller’s scope

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}

This deployment has no runner

Media typeapplication/json

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
error
required
object
code
required

Stable machine-readable code. Clients branch on this, never on the message.

string
message
required

Operator-facing sentence. Safe to display; never carries an internal error’s own text.

string
Examplegenerated
{
"error": {
"code": "example",
"message": "example"
}
}