REST API

The webserver’s API ([webserver] port, 8080), generated from its OpenAPI description (schema/openapi.json). The schedr CLI uses it. Actions answer 202 with a command: the master applies it, and GET /api/v1/commands/{command_id} shows its decision.

Operations

GET /api/v1/backfills/{backfill_id}

A backfill, with its runs by state (schedr runs backfill prints its ID).

Parameter

In

Type

Description

backfill_id

path

string

The backfill’s ID

Answers: 200 BackfillView, 400 ErrorBody, 404 ErrorBody.

POST /api/v1/backfills/{backfill_id}/cancel

Cancel a backfill (schedr runs cancel --backfill, decision 402): its queued and running runs; the finished ones stay as they are. Applied by the master; poll the command.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

backfill_id

path

string

The backfill’s ID

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/changes

What changed, as it happens: run, dag, workers and refresh events (see the module documentation).

Answers: 200.

GET /api/v1/commands/{command_id}

A command and the master’s decision about it.

Parameter

In

Type

Description

command_id

path

string

The command’s ID

Answers: 200 CommandView, 404 ErrorBody.

GET /api/v1/connections

Each DAG root’s connections in its current code (decision 211): name, type, the file defining it, why one can’t be used, and the DAGs and tasks declaring it; never a value. A task declaring a connection no file defines lists it too, refused.

Answers: 200 ConnectionList.

POST /api/v1/connections/check

Render connections on a worker (schedr connections check, decision 174): each secret they name present or missing, never a value. The command’s result fills in as the workers answer: poll it until no job is running.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

Body: CheckConnectionsRequest.

Answers: 202 CommandView, 400 ErrorBody.

POST /api/v1/connections/{name}/test

Open a connection on a worker and run its check (schedr connections test, decisions 198-200), beside the tasks. The command’s result fills in when the worker answers.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

name

path

string

The connection’s name

Body: TestConnectionRequest.

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/dags

Every DAG not removed.

Answers: 200 DagList.

GET /api/v1/dags/{dag_id}

One DAG.

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

Answers: 200 DagView, 404 ErrorBody.

GET /api/v1/dags/{dag_id}/backfills

A DAG’s backfills, newest first (the 50 newest), with their runs by state (decision 403).

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

Answers: 200 BackfillList, 404 ErrorBody.

POST /api/v1/dags/{dag_id}/backfills

Create a backfill (schedr runs backfill, decisions 363, 364, 400-404): a run per fire time of the range with no successful, queued or running run (every one with all), oldest first, behind the other kinds of runs. Applied by the master; the command’s result has the counts and the backfill’s ID (its own).

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

dag_id

path

string

The DAG’s ID

Body: BackfillRequest.

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/dags/{dag_id}/memory

Each task’s p95 peak memory over its attempts of the last 30 days, against its limit: closest to it first (decision 467).

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

Answers: 200 DagMemoryList, 404 ErrorBody.

POST /api/v1/dags/{dag_id}/pause

Pause a DAG: the scheduler creates no runs of it (optionally cancelling those in progress). Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

dag_id

path

string

The DAG’s ID

Body: PauseRequest.

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/dags/{dag_id}/runs

A DAG’s runs, newest first.

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

for

query (optional)

timestamp

Only the runs for this moment (--for).

limit

query (optional)

integer

At most this many (default 50, at most 500).

Answers: 200 RunList, 404 ErrorBody.

POST /api/v1/dags/{dag_id}/runs

Start a manual run (schedr runs trigger). Applied by the master; poll the command for the decision and the run’s ID.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

dag_id

path

string

The DAG’s ID

Body: TriggerRequest.

Answers: 202 CommandView, 400 ErrorBody.

POST /api/v1/dags/{dag_id}/sensors/{sensor}/switch-on

Switch a wait step back on, forgetting its strikes. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request

dag_id

path

string

The DAG’s ID

sensor

path

string

The wait step’s task ID

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/dags/{dag_id}/tasks/{task_id}/memory

A task’s last ended attempts’ peak memory, all its runs and instances (decision 467).

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

task_id

path

string

The task’s ID

Answers: 200 AttemptMemoryList, 404 ErrorBody.

GET /api/v1/dags/{dag_id}/trigger

A DAG’s trigger: 404 for a DAG without one.

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

Answers: 200 TriggerView, 404 ErrorBody.

GET /api/v1/dags/{dag_id}/trigger/events

What a DAG’s trigger found, newest received first.

Parameter

In

Type

Description

dag_id

path

string

The DAG’s ID

limit

query (optional)

integer

How many, 50 by default and 500 at most.

before

query (optional)

timestamp

Those after the one last listed: its received_at.

before_key

query (optional)

string

And its key, for those received at the same moment.

Answers: 200 EventList, 400 ErrorBody.

POST /api/v1/dags/{dag_id}/trigger/restart

Start a DAG’s trigger again from its bookmark, whatever stopped it. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s

dag_id

path

string

The DAG’s ID

Answers: 202 CommandView, 400 ErrorBody.

POST /api/v1/dags/{dag_id}/trigger/skip

Pass the run an @trigger(wait_for=...) is called for and keeps failing on, so its next call gets the next run (decision 353); refused while a call of it runs. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s

dag_id

path

string

The DAG’s ID

Answers: 202 CommandView, 400 ErrorBody.

POST /api/v1/dags/{dag_id}/trigger/switch-on

Switch a DAG’s trigger back on, forgetting its strikes. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s

dag_id

path

string

The DAG’s ID

Answers: 202 CommandView, 400 ErrorBody, 404 ErrorBody.

POST /api/v1/dags/{dag_id}/unpause

Unpause a DAG. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

dag_id

path

string

The DAG’s ID

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/deployment

The deployment this webserver serves, as nodes (decisions 121-123): this webserver, the masters heard from in the last 30 s (the leader first; standbys too), and every worker, each with its effective configuration as the node masked it (secrets never in clear).

Answers: 200 DeploymentView.

GET /api/v1/events

The events posted, newest first, their data masked.

Parameter

In

Type

Description

name

query (optional)

string

Only those of this name.

limit

query (optional)

integer

How many, 50 by default and 500 at most.

Answers: 200 NamedEventList.

POST /api/v1/events

Post an event: each post is one, a repeat of a name and key too; a trigger starts one run per key, a waiting step matches one posted since its run started. Sent again with the same Idempotency-Key, it is the event stored the first time.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the event stored the first time

Body: PostEventRequest.

Answers: 200 NamedEventView, 201 NamedEventView, 400 ErrorBody, 413 ErrorBody, 422 ErrorBody.

GET /api/v1/import-errors

The files of each DAG root’s current code that failed to import (decision 66). A DAG defined in such a file keeps its last good version (still listed) but is held: no run is created and manual triggers are refused until the file is fixed (decision 72). A timeout or a runner that died holds nothing: the file is parsed again (72.2). Fixing the file and syncing the root makes the entry go.

Answers: 200 ImportErrorList.

GET /api/v1/metrics/memory

Every process’s memory together over a range, in buckets (decision 462’s sparkline).

Parameter

In

Type

Description

range

query (optional)

string

1h, 24h (the default), 7d or 30d.

process

query (optional)

string

One process’s only (its ID).

Answers: 200 MemoryTotals, 400 ErrorBody.

GET /api/v1/metrics/samples

Each process’s memory and CPU over a range, in buckets: averages and peaks, its container’s limit, and a worker’s parts (decisions 464, 465).

Parameter

In

Type

Description

range

query (optional)

string

1h, 24h (the default), 7d or 30d.

process

query (optional)

string

One process’s only (its ID).

Answers: 200 SampleSeriesList, 400 ErrorBody.

GET /api/v1/metrics/tasks

The attempts of a range in buckets: how many ended, by how they ended, and the start latency of those started, as p50 and p95 (decision 494).

Parameter

In

Type

Description

range

query (optional)

string

1h, 24h (the default), 7d or 30d.

Answers: 200 TaskFlowList, 400 ErrorBody.

GET /api/v1/runs

Runs of every DAG, newest triggered first (then by ID); filtered by DAG and state, paged with before and before_run (the last listed run’s triggered_at and ID).

Parameter

In

Type

Description

dag

query (optional)

string

Only this DAG’s runs.

dag_contains

query (optional)

string

Only the runs of DAGs whose ID holds this, in any case (sync matches sync_orders and Daily_Sync).

state

query (optional)

string

Only runs in this state: queued, running, success, failed or cancelled.

before

query (optional)

timestamp

Only runs triggered before this moment: the last listed run’s triggered_at, for the next page (with before_run).

before_run

query (optional)

string

With before: the last listed run’s ID, so runs triggered at that same moment (a scheduler round triggers its runs together) are listed after it, by ID, not skipped.

limit

query (optional)

integer

At most this many (default 50, at most 500).

Answers: 200 RunList, 400 ErrorBody.

GET /api/v1/runs/{run_id}

A run with its tasks.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

Answers: 200 RunDetail, 404 ErrorBody.

POST /api/v1/runs/{run_id}/cancel

Cancel a run (schedr runs cancel). Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

run_id

path

string

The run’s ID

Answers: 202 CommandView, 400 ErrorBody.

GET /api/v1/runs/{run_id}/commands

The commands about a run, oldest first: the trigger that made it, and cancelling it or cancelling or retrying its tasks, with the master’s decisions.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

Answers: 200 CommandList, 404 ErrorBody.

GET /api/v1/runs/{run_id}/dag

The DAG a run ran with: its version’s DAG JSON (tasks, dependencies, settings), for its graph.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

Answers: 200 table, 404 ErrorBody.

GET /api/v1/runs/{run_id}/resources

A run’s resources, each with its setup, cleanup, users and state (decision 340).

Parameter

In

Type

Description

run_id

path

string

The run’s ID

Answers: 200 ResourceList, 404 ErrorBody.

GET /api/v1/runs/{run_id}/resources/{resource}

One resource of a run, by its name (decision 340).

Parameter

In

Type

Description

run_id

path

string

The run’s ID

resource

path

string

The resource: its setup’s task ID

Answers: 200 ResourceView, 404 ErrorBody.

GET /api/v1/runs/{run_id}/tasks/{task_id}/attempts

The attempts of a run’s task, oldest first.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

task_id

path

string

The task’s ID

map_index

query (optional)

integer

The instance, from 0 (a mapped task only). For an output, none gives the mapped task’s whole list; for a cancel, the whole task; attempts, logs and a retry need it.

Answers: 200 AttemptList, 400 ErrorBody, 404 ErrorBody.

GET /api/v1/runs/{run_id}/tasks/{task_id}/attempts/{try_number}/log

A part of an attempt’s log, read from the worker that ran it; read on from next to follow a running task. 404 when the attempt has no log (yet), or the worker no longer has it; 503 when the worker is gone or can’t be reached.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

task_id

path

string

The task’s ID

try_number

path

integer

The attempt’s try number

from

query (optional)

integer

The first byte wanted (0 by default): the next of the previous part, to follow a log.

limit

query (optional)

integer

At most this many bytes (1 MiB by default; between 4 bytes, one character, and that).

map_index

query (optional)

integer

The instance of a mapped task, from 0 (required for one).

Answers: 200 LogChunk, 404 ErrorBody, 503 ErrorBody.

POST /api/v1/runs/{run_id}/tasks/{task_id}/cancel

Cancel one task of a run (schedr tasks cancel): stopped if it runs, cancelled at once if it hasn’t started; the tasks downstream of it are cancelled. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

run_id

path

string

The run’s ID

task_id

path

string

The task’s ID

map_index

query (optional)

integer

The instance, from 0 (a mapped task only). For an output, none gives the mapped task’s whole list; for a cancel, the whole task; attempts, logs and a retry need it.

Answers: 202 CommandView, 400 ErrorBody, 404 ErrorBody.

GET /api/v1/runs/{run_id}/tasks/{task_id}/output

A task’s stored output in a run, with its outcome; 404 while it has none.

Parameter

In

Type

Description

run_id

path

string

The run’s ID

task_id

path

string

The task’s ID

map_index

query (optional)

integer

The instance, from 0 (a mapped task only). For an output, none gives the mapped task’s whole list; for a cancel, the whole task; attempts, logs and a retry need it.

Answers: 200 OutputView, 400 ErrorBody, 404 ErrorBody, 410 ErrorBody.

POST /api/v1/runs/{run_id}/tasks/{task_id}/retry

Retry an unschedulable task of an unfinished run (schedr tasks retry). Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

run_id

path

string

The run’s ID

task_id

path

string

The task’s ID

map_index

query (optional)

integer

The instance, from 0 (a mapped task only). For an output, none gives the mapped task’s whole list; for a cancel, the whole task; attempts, logs and a retry need it.

Answers: 202 CommandView, 400 ErrorBody, 404 ErrorBody.

GET /api/v1/sensors/switched-off

The wait steps switched off for getting their host killed too many times in a row (decision 338).

Answers: 200 SensorList.

GET /api/v1/triggers

Every DAG’s trigger.

Answers: 200 TriggerList.

GET /api/v1/workers

Every worker the master has seen, gone ones included.

Answers: 200 WorkerList.

POST /api/v1/workers/{worker_id}/drain

Drain a worker for maintenance (schedr workers drain): no new tasks, its running ones finish; kept across restarts until resumed. Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

worker_id

path

string

The worker’s ID

Answers: 202 CommandView, 400 ErrorBody.

POST /api/v1/workers/{worker_id}/resume

Let a drained worker take tasks again (schedr workers resume). Applied by the master; poll the command for the decision.

Parameter

In

Type

Description

Idempotency-Key

header (optional)

string

A key of the client’s for this request: sent again with it, it is the command stored the first time (B140)

worker_id

path

string

The worker’s ID

Answers: 202 CommandView, 400 ErrorBody.

Schemas

AttemptList

A task’s attempts.

Field

Type

Description

attempts

list of AttemptView

Oldest first.

AttemptMemoryList

A task’s last ended attempts’ peak memory (decision 467): the task panel’s chart.

Field

Type

Description

attempts

list of AttemptMemoryView

Its last ended attempts, all its runs and instances, the oldest first.

limit_bytes (optional)

integer

Its memory budget in the DAG’s current version (memory=), in bytes; none: the worker’s share, which differs by worker.

task_id

string

The task.

AttemptMemoryView

An ended attempt’s peak memory.

Field

Type

Description

attempt_id

string

The attempt.

ended_at

timestamp

When it ended.

map_index (optional)

integer

Its instance of a mapped task; none for a task that isn’t mapped.

peak_memory_bytes (optional)

integer

Its peak memory (the watchdog’s PSS), in bytes; none when it wasn’t read.

run_id

string

Its run.

status

string

How it ended (success, oom_killed, …).

try_number

integer

Its try.

AttemptView

An attempt of a task.

Field

Type

Description

assigned_at

timestamp

When it was assigned.

attempt_id

string

Its ID.

chained_run_id (optional)

string

The run a TriggerDagOperator’s attempt started (no worker runs it).

cleanup (optional)

any

core_dumped

boolean

Whether its process dumped core (ended by a signal).

duration_ms (optional)

integer

How long it ran, measured by the worker (the timestamps come from the master’s wall clock, so don’t subtract them); none while it runs or for attempts ended by the master.

ended_at (optional)

timestamp

When it ended.

error_kind (optional)

string

The error kind schedr recognised.

error_summary (optional)

table

The structured error summary (exception, message, traceback).

exit_code (optional)

integer

The process’s exit code.

peak_memory_bytes (optional)

integer

The peak memory of its processes, sampled by the worker (about once a second); none when it wasn’t measured.

start_method (optional)

string

How the worker started it: spawn (a new process: an interpreter for a Python task, the command for a command task) or fork (from the fork server); none until the worker reported its start.

started_at (optional)

timestamp

When the worker started it.

status (optional)

string

How it ended (success, failed, timed_out, …); none while it runs.

try_number

integer

Its try number.

usage (optional)

any

worker_id (optional)

string

The worker it ran on.

BackfillList

A DAG’s backfills, newest first.

Field

Type

Description

backfills

list of BackfillView

The backfills.

BackfillRequest

A backfill to create (schedr runs backfill, decisions 363, 364, 400-404): a run per fire time of [from, to] with no successful, queued or running run, oldest first.

Field

Type

Description

all (optional)

boolean

A run for every fire time of the range, not only the missing ones (--all).

dry_run (optional)

boolean

Count only: the command’s result says what would be created, and nothing is.

from

timestamp

The range’s first moment (inclusive).

params (optional)

table

Values for every run’s parameters, as JSON, over the DAG’s defaults; checked once.

to (optional)

timestamp

Its last moment (inclusive); now if not given, and a later one ends at now.

BackfillRunCounts

A backfill’s runs by state.

Field

Type

Description

cancelled

integer

Cancelled.

failed

integer

Failed.

queued

integer

Waiting for max_active_runs, behind the other kinds of runs.

running

integer

Running.

success

integer

Succeeded.

BackfillView

A backfill (decision 403).

Field

Type

Description

all

boolean

Whether every fire time got a run (--all).

backfill_id

string

Its ID (the command’s that created it).

created_at

timestamp

When.

created_runs

integer

How many of them got a run; the others were skipped.

dag_id

string

Its DAG.

fire_times

integer

The fire times of its range.

from

timestamp

The range’s first moment.

requested_by

string

Who asked for it.

runs

BackfillRunCounts

Its runs by state.

to

timestamp

Its last moment (now, when it was asked for one later).

unfinished

boolean

Whether some of its runs are queued or running: what cancelling it would cancel.

CheckConnectionsRequest

Connections to check on a worker (schedr connections check).

Field

Type

Description

name (optional)

string

One connection; all of the root’s if not given.

root (optional)

string

The root; every root with connections if not given.

worker (optional)

string

The worker to run it on; one the master picks if not given.

CleanupView

An attempt’s cleanup.

Field

Type

Description

duration_ms (optional)

integer

How long its tries ran, measured by the worker.

error_kind (optional)

string

The error kind of its last failed try.

error_summary (optional)

table

The structured error summary of its last failed try.

handles

list of tables

The handles the attempt registered ({"handle_type": ..., "value": ...}), masked, in order.

moves

integer

How many times it moved to another worker (cleanup_anywhere).

result (optional)

string

How it ended (ok, failed, worker_lost, not_needed); none until it has.

tries (optional)

integer

The tries it made.

CommandList

The commands about a run.

Field

Type

Description

commands

list of CommandView

Oldest first.

CommandView

A command: an action the master applies, then marks applied or rejected.

Field

Type

Description

command_id

string

Its ID; poll GET /api/v1/commands/{command_id} for the decision.

decided_at (optional)

timestamp

When the master decided it.

kind

string

trigger_run, cancel_run, pause_dag or unpause_dag.

reason (optional)

string

Why it was rejected.

requested_at

timestamp

When.

requested_by

string

Who asked for it.

result (optional)

table

What it produced when applied, e.g. {"run_id": ...} for a trigger.

status

string

pending, applied or rejected.

ConnectionInfo

A connection, as its root’s current parse records it.

Field

Type

Description

file (optional)

string

The file defining it, relative to the root.

name

string

Its name.

refused (optional)

string

Why it can’t be used: defined twice, invalid, or defined nowhere (a task declares it).

type (optional)

string

A typed connection’s type (http, ssh, mongo, sql, generic); none for a @connection function, or one that can’t be used.

used_by (optional)

list of ConnectionUse

The DAGs whose tasks declare it, by DAG.

ConnectionList

Each DAG root’s connections, in its current code (decision 211): what the UI lists, never a value.

Field

Type

Description

roots

list of RootConnections

By root.

ConnectionUse

The tasks of one DAG declaring a connection.

Field

Type

Description

dag_id

string

The DAG.

tasks

list of strings

Its tasks declaring it, in the DAG’s order.

CoverageView

The minutes the deployment was sampled in a bucket.

Field

Type

Description

at

timestamp

The bucket’s start.

minutes

integer

Its minutes in which any process was sampled.

DagList

The DAGs.

Field

Type

Description

dags

list of DagView

Every DAG not removed, in ID order.

DagMemoryList

Each task’s p95 peak memory over its recent attempts against its limit (decision 467): the DAG page’s table.

Field

Type

Description

since

timestamp

Attempts ended since this (30 days before the request), of the DAG’s 1000 runs ended last since then and those still going, are counted.

tasks

list of TaskPeakView

The tasks with such attempts: those with a limit closest to it first, then the others by their p95, highest first.

DagView

A DAG.

Field

Type

Description

conflict (optional)

list of LocationView

Every place defining it, while it is in conflict (then it can’t run).

dag_id

string

Its ID.

description (optional)

string

Its description.

held (optional)

any

limits (optional)

list of LimitView

The concurrency limits its current version sets, each with how many run now (decision 96): only on one DAG’s view (GET /api/v1/dags/{dag_id}), not in the list.

location (optional)

any

params (optional)

list of ParamFieldView

The run parameters its current version takes, as the UI’s trigger form shows them (decision 149): only on one DAG’s view, not in the list; none when it takes none.

tags

list of strings

Its tags.

trigger (optional)

table

Its trigger as in DAG JSON.

trigger_state (optional)

any

warnings (optional)

list of strings

What is wrong with its current version that shows only when a run reaches it: a connection a task declares that its root’s current files don’t define, or define twice (decision 179). Only on one DAG’s view, not in the list.

DeploymentView

The deployment this webserver serves, as nodes (decisions 121-123): its own, its masters (leader and standbys) and its workers, each with its effective configuration, masked by the node itself before it left its process (no secret in clear).

Field

Type

Description

masters

list of anys

The masters heard from lately: the leader (the lease’s holder) first.

user

string

Who this request was made as, as the webserver sees it (anonymous without authentication; the person the web UI passed on, from the UI).

webserver

NodeView

The webserver answering (one of the deployment’s, if it has several).

workers

list of WorkerNodeView

Every worker the master has seen, gone ones included.

ErrorBody

An error.

Field

Type

Description

error

string

What went wrong.

EventList

A trigger’s events.

Field

Type

Description

events

list of EventView

Newest received first.

EventView

An event a trigger found.

Field

Type

Description

at (optional)

timestamp

When it happened, if it said.

data

any

Its data, JSON of any kind.

key

string

Its key.

received_at

timestamp

When the master got it.

HeldView

Why a DAG is held: its file’s import error. The error is the file’s, so every DAG of the file is held (decision 72.3).

Field

Type

Description

exception

string

The error’s exception class name, e.g. ModuleNotFoundError.

message

string

The error’s message.

path

string

The file, relative to its root.

reason

string

What happened and what to do, for people: that the file failed (not only this DAG), why, and how to fix it.

ImportErrorList

The import errors of each DAG root’s current code.

Field

Type

Description

errors

list of ImportErrorView

By root, then path.

ImportErrorView

A file of a DAG root’s current code that failed to import (decision 66).

Field

Type

Description

content_hash

string

The root’s content hash that was parsed.

exception

string

The exception’s class name (ParseTimeout, RunnerDied or ParseResultTooLarge when the worker stopped the file; InvalidDag when the master refused a DAG).

master_id (optional)

string

The master that stored the parse; none when not known (stored before it was kept).

message

string

The message.

parsed_at

timestamp

When it was parsed.

path

string

The file, relative to the root.

root

string

The DAG root.

schedr_version

string

That worker’s schedr version.

traceback

string

The traceback’s last lines.

worker_id

string

The worker that parsed it.

LimitView

A concurrency limit and how many of what it limits run now: open attempts (assigned, not yet started, running, cleaning up), as the master counts them.

Field

Type

Description

limit

string

max_active_tasks, max_active or max_active_per_run.

running

integer

How many run now: the DAG’s tasks, the task’s instances across runs, or, for max_active_per_run, the most in any one run.

task_id (optional)

string

The task it is set on; none for max_active_tasks (the DAG’s).

value

integer

Its value.

LocationView

Where a DAG is defined.

Field

Type

Description

path

string

The file, relative to the root.

root

string

The DAG root.

LogChunk

A part of an attempt’s log, read from the worker that ran it.

Field

Type

Description

attempt_id

string

The attempt.

content

string

The log’s text, whole lines only (a running attempt’s last line once it ends), with its secrets masked: a password in an address, a value after a name like password= (invalid UTF-8 replaced by U+FFFD). A line longer than the part asked for is shown to its last whitespace in it, then … (the rest of this line is not shown: it is over N bytes), its rest passed over.

from

integer

The first byte of content: the one asked for, or past it, at the start of the next line, when that one is inside a line.

next

integer

Where the next part starts: the byte after content, or past it, after the part of a line longer than a part that isn’t shown.

running

boolean

Whether the attempt still runs (its log may grow).

size

integer

The log’s size when it was read.

try_number

integer

Its try number.

worker_id

string

The worker it ran on (and that answered).

MasterView

A master, leading or standing by.

MemoryPointView

A bucket’s total memory.

Field

Type

Description

at

timestamp

The bucket’s start.

resident

integer

Every process’s whole memory together, in bytes.

MemoryTotals

Every process’s memory together over a range (decision 462’s sparkline).

Field

Type

Description

from

timestamp

The range’s start.

points

list of MemoryPointView

The whole memory, in bytes, of each bucket with samples, oldest first: the average of its minutes’.

step_s

integer

Each point’s width, in seconds.

to

timestamp

Its end: when it was asked.

NamedEventList

Posted events.

Field

Type

Description

events

list of NamedEventView

Newest posted first.

NamedEventView

An event posted through the API.

Field

Type

Description

at

timestamp

When it happened.

data

any

Its data, masked as an output is.

id

string

Its ID.

key

string

Its key.

name

string

Its name.

posted_at

timestamp

When it was posted.

posted_by

string

Who posted it.

NodeUsageView

A schedr process’s memory and CPU, and its container’s (decision 463).

Field

Type

Description

container_bytes (optional)

integer

Its cgroup’s memory now; none outside a cgroup v2.

container_limit_bytes (optional)

integer

Its container’s memory limit; none when unlimited.

cpu_seconds

number

CPU time used (user and system) since it started, in seconds.

resident_bytes

integer

Resident memory, in bytes.

NodeView

A process of the deployment.

Field

Type

Description

config

table

Its effective configuration, masked.

host

string

Its host.

process_id

string

The process (shared by a master and a worker in standalone).

schedr_version

string

Its schedr version.

usage (optional)

any

OutputView

A task’s stored output in a run.

Field

Type

Description

outcome

string

The outcome the task finished with.

value

any

The value it returned, masked (decision 131: its texts’ secrets, and a field whose name has a word naming a secret); downstream tasks get it as stored.

ParamFieldView

One field of a DAG’s run parameters, as a form shows it.

Field

Type

Description

choices (optional)

list of tables

A choice’s values, as JSON (strings, numbers, booleans; null is nullable).

default (optional)

table

Its default as JSON, the form’s starting value (null is a default); absent when it has none or it is withheld.

kind

one of bool, int, float, text, date, datetime, duration, choice, json

How it is entered.

name

string

The field’s name, as a trigger’s values name it.

nullable

boolean

Whether it may be null (T | None): the form has a “none” box beside it.

required

boolean

Whether a trigger must give it (it has no default).

secret

boolean

Whether its default and choices are withheld (decision 150): its name has a word naming a secret, or its default or a choice holds one. The form gives it an empty password input; left empty, the master uses the default.

ParamKind

How a parameter is entered.

PartsPointView

A worker’s memory by part in a bucket, on average.

Field

Type

Description

fork_servers_bytes

integer

Its fork servers’.

tasks_bytes

integer

Its running tasks’.

watcher_hosts_bytes

integer

Its wait step hosts’.

PauseRequest

Pausing a DAG.

Field

Type

Description

cancel_runs (optional)

boolean

Also cancel its queued and running runs.

PostEventRequest

An event to post (POST /api/v1/events, decision 354).

Field

Type

Description

at (optional)

timestamp

When it happened; now if not given. A run it starts is planned for it.

data (optional)

any

Its data, JSON of any kind; null if not given.

key

string

Its key: a trigger starts one run per key, a waiting step matches its own key.

name

string

Its name, written as a DAG ID is.

ProblemView

A problem a node has now (decision 129): shown on its node, yellow for a warning, red for an error.

Field

Type

Description

error

boolean

An error; a warning otherwise.

message

string

What it is, for people.

ProcessSamplesView

A process’s points over a range.

Field

Type

Description

container_limit (optional)

integer

Its container’s memory limit as its latest sample says; none when unlimited (or not in a container).

ended (optional)

boolean

Whether it has ended: no sample within three of the master’s sample intervals before the samples were asked for (stopped, restarted as a new process, or lost).

parts (optional)

any

points

list of SamplePointView

Its buckets with samples, oldest first.

process_id

string

The process.

roles

table

What it runs (master, worker, webserver), each with its node’s ID, as sampled last.

ResourceList

A run’s resources.

Field

Type

Description

resources

list of ResourceView

In the DAG’s order.

ResourceView

A resource of a run: its setup, its cleanup and its users.

Field

Type

Description

blocking

boolean

Whether what follows its group waits for its cleanup.

cleanup

string

Its cleanup’s task ID.

setup

string

Its name: its setup’s task ID.

state

string

setting_up, waiting_for_users, cleaning_up, cleaned, cleanup_failed, cleanup_cancelled (cancelled by hand: what the setup made may be left) or not_needed.

users

list of strings

The tasks that use it, in the DAG’s order.

RootConnections

One root’s connections.

Field

Type

Description

connections

list of ConnectionInfo

By name: those its files define, and those its tasks declare without one.

root

string

The DAG root.

RunBackfillView

A backfill run’s backfill and its place among the backfill’s runs, oldest first.

Field

Type

Description

backfill_id

string

The backfill’s ID.

index

integer

Its place, from 1.

total

integer

How many runs the backfill has.

RunDetail

A run with its tasks.

Field

Type

Description

code_hashes

list of strings

The code hashes its attempts ran with, in the order first used. More than one: its tasks ran on different code (it changed during the run).

params (optional)

table

Its parameters as JSON, masked like a task’s output (decision 134); {} for a DAG that takes none.

resources (optional)

list of ResourceView

Its resources, in the DAG’s order (decision 275: each one’s state from its two tasks).

run

RunView

The run.

tasks

list of TaskView

Its tasks, in task ID order.

RunList

Runs.

Field

Type

Description

runs

list of RunView

Newest first: a DAG’s by planned_for; the list over every DAG by triggered_at, then run ID.

RunView

A run.

Field

Type

Description

backfill (optional)

any

dag_id

string

The DAG.

ended_at (optional)

timestamp

When it finished.

kind

string

scheduled, manual, backfill, chained or event.

late_failure (optional)

string

A success that learnt of a failure after its end, shown yellow (decision 309): why, late_cleanup_failed for now.

parent_run_id (optional)

string

The run whose TriggerDagOperator started it, for a chained run, or whose success started it, for a run of a RunOf trigger.

planned_for

timestamp

The moment it is for.

run_id

string

Its ID (a UUIDv7).

since

timestamp

The start of its window, (since, planned_for].

started_at (optional)

timestamp

When it started running.

state

string

queued, running, success, failed or cancelled.

triggered_at

timestamp

When it was created.

triggered_by

string

scheduler, a user name, the parent run, or trigger.

SamplePointView

A bucket of a process’s samples: averages and peaks.

Field

Type

Description

at

timestamp

The bucket’s start.

container_avg (optional)

integer

Its container’s memory, on average; none outside a cgroup v2.

container_limit (optional)

integer

Its container’s highest limit in the bucket; none when unlimited.

container_peak (optional)

integer

The highest.

cpu_avg (optional)

number

Cores used, on average; none before a second sample.

cpu_peak (optional)

number

The highest minute’s.

memory_avg

integer

Its whole memory, in bytes, on average: itself and, for a worker, its fork servers, wait step hosts and running tasks.

memory_peak

integer

The highest.

minutes

integer

The minutes this process was sampled in the bucket: its averages’ weight in a deployment’s total (see [SampleSeriesList::coverage]).

parts (optional)

any

resident_avg

integer

Resident memory, in bytes, on average: the process itself.

resident_peak

integer

The highest.

SampleSeriesList

Samples of each process over a range (decisions 464, 465), in buckets: the Metrics page’s charts.

Field

Type

Description

coverage (optional)

list of CoverageView

The minutes the deployment was sampled in each bucket (asked for every process): a deployment’s total in a bucket is its processes’ averages weighted by their minutes over these, so a process replaced within a bucket isn’t counted twice.

from

timestamp

The range’s start (the first bucket’s).

processes

list of ProcessSamplesView

Each process sampled in it, by ID.

range

string

The range asked: 1h, 24h, 7d or 30d.

step_s

integer

Each point’s width, in seconds.

to

timestamp

Its end: when it was asked.

SensorList

The wait steps switched off.

Field

Type

Description

sensors

list of SensorView

By DAG and task.

SensorView

A wait step switched off for getting its host killed too many times in a row (decision 338).

Field

Type

Description

dag_id

string

Its DAG.

sensor

string

The wait step.

strikes

integer

Its host kills in a row.

switched_off_at

string

When it was switched off (RFC 3339).

TaskFlowList

The attempts of a range in buckets (decision 494): how many ended, by how, and how long those started took from their assignment.

Field

Type

Description

buckets

list of TaskFlowView

Every bucket of the range, oldest first, empty ones included.

from

timestamp

The range’s start (the first bucket’s).

range

string

The range asked: 1h, 24h, 7d or 30d.

step_s

integer

Each point’s width, in seconds.

to

timestamp

Its end: when it was asked.

TaskFlowView

One bucket’s attempts.

Field

Type

Description

at

timestamp

The bucket’s start.

failed

integer

Those that failed: failed, timed_out, oom_killed.

start_p50_ms (optional)

integer

Their median time from assignment to start, in milliseconds (none: none started).

start_p95_ms (optional)

integer

Their 95th percentile, in milliseconds.

started

integer

Attempts that started in it.

stopped

integer

Those stopped by something else: cancelled, interrupted, lost, assignment_expired.

succeeded

integer

Attempts that ended in it and succeeded.

TaskMemoryView

A running task’s memory, named.

Field

Type

Description

attempt_id

string

The attempt.

bytes

integer

Its memory, in bytes.

dag_id

string

Its DAG.

map_index (optional)

integer

Its map index; none for an unmapped task.

run_id

string

Its run.

task_id

string

Its task.

TaskPeakView

A task’s peaks.

Field

Type

Description

attempts

integer

The attempts counted: those with a peak, the newest 1000 at most.

limit_bytes (optional)

integer

Its memory budget in the DAG’s current version, in bytes; none: the worker’s share.

max_bytes

integer

The highest, in bytes.

of_limit (optional)

number

p95_bytes over limit_bytes; none without a limit.

oom_killed

integer

Of them, how many were killed for their memory.

p95_bytes

integer

The 95th percentile of their peaks (nearest rank), in bytes.

task_id

string

The task.

TaskView

A task of a run.

Field

Type

Description

cleanup (optional)

string

How its cleanups ended (ok, failed, worker_lost, not_needed): the last, unless one failed; none for a task without a cleanup, or before its first one ends.

instances (optional)

integer

A mapped task as a whole: how many instances it has (0 before it expands, or for an empty list); null for an unmapped task and for an instance.

map_index (optional)

integer

Which instance of a mapped task, from 0; -1 for an unmapped task, and for a mapped task as a whole (decision 80).

outcome (optional)

string

Its outcome, on success.

reason (optional)

string

Why it waits or can’t be scheduled, or why a mapped task failed without an attempt (too many instances, a mapped value that isn’t a list).

state

string

Its state (scheduled, queued, running, success, …).

task_id

string

The task’s ID.

try_number

integer

Attempts made.

updated_at

timestamp

When it last changed.

TestConnectionRequest

A connection to test on a worker (schedr connections test).

Field

Type

Description

root (optional)

string

Its root; the one root defining it if not given.

timeout_ms (optional)

integer

How long it may take, in milliseconds: [webserver] connection_test_timeout if not given.

worker (optional)

string

The worker to run it on; one the master picks if not given.

TriggerList

The triggers.

Field

Type

Description

triggers

list of TriggerView

By DAG.

TriggerRequest

A manual run to start.

Field

Type

Description

event (optional)

string

For a DAG a trigger starts: the key of an event it found, to run again.

event_at (optional)

timestamp

And when it happened; the run’s moment otherwise.

event_data (optional)

any

And its data, as JSON of any kind.

event_key (optional)

string

Or an event given here: its key. It is never stored as an event.

params (optional)

table

Values for the run’s parameters, as JSON ({"region": "us"}), over the DAG’s defaults; checked by the master against the DAG’s schema (decision 133).

planned_for (optional)

timestamp

The moment the run is for (--for); now if not given. Must not be in the future.

TriggerState

A DAG’s trigger’s switch (decision 459).

TriggerView

A DAG’s trigger.

Field

Type

Description

bookmark (optional)

string

The last key acted on: what it starts from.

called_for (optional)

string

@trigger(wait_for=...) (decision 353): the run of the other DAG it is called for and hasn’t ended well with yet; schedr triggers skip passes it.

dag_id

string

Its DAG.

failures

integer

Its errors in a row.

last_error (optional)

string

Its last error.

last_event_at (optional)

timestamp

When it last found something.

last_poked_at (optional)

timestamp

When a poke’s call last ended.

last_restart_at (optional)

timestamp

When it was last started again for finding nothing for its restart_if_idle.

not_before (optional)

timestamp

Not started again before this moment.

started_at (optional)

timestamp

When this run of it started.

state

string

running, waiting (for a free watcher slot or to start again), stopped (see stopped_why), switched_off or paused (its DAG’s, or outside its start and end).

stopped_why (optional)

string

Why it isn’t running although its DAG wants it: back_pressure or returned.

stuck (optional)

boolean

A running poke trigger none of whose calls has ended for over three times its every plus a heartbeat: its worker may hang; schedr triggers restart starts it again.

trigger

string

Its function.

worker (optional)

string

The worker running it.

UsageView

What an attempt’s process used.

Field

Type

Description

involuntary_context_switches (optional)

integer

Times it was preempted; none as for voluntary_context_switches.

major_faults

integer

Page faults that needed I/O.

peak_rss_bytes (optional)

integer

The peak resident set size, in bytes; for a forked process it includes the pages it shares with the fork server (peak_memory_bytes, the watchdog’s PSS, doesn’t); none for a spawned process (its memory is gone when the worker reads it).

system_cpu_micros

integer

CPU time in the kernel, in microseconds.

user_cpu_micros

integer

CPU time in user mode, in microseconds.

voluntary_context_switches (optional)

integer

Times it gave up the CPU (waiting for I/O or a lock), with its threads and reaped children; none for a spawned process (only its leader thread’s could be read).

WarningView

Something wrong with a worker.

Field

Type

Description

interpreter

string

The interpreter it concerns; empty if none.

kind

string

What kind: fork_server_disabled.

message

string

What it means for tasks.

WatcherHostView

A process running a worker’s wait steps, or a code set whose hosts were lost.

Field

Type

Description

code

string

The code it runs: its folders’ names, the copies’ hashes.

hosts_lost

integer

Hosts of this code lost since the agent started: crashes and memory kills.

memory_bytes

integer

The memory it uses.

threads

integer

Its process’s threads, the wait steps’ among them.

tied_threads

integer

Those a wait step is tied to: running its to_thread calls, or started by it. The rest of the process, a library’s pools among them, can’t be told apart.

wait_steps

integer

The wait steps on it (none: no host runs this code now).

WorkerList

The workers.

Field

Type

Description

workers

list of WorkerView

Every worker the master has seen, in ID order.

WorkerMemoryView

A worker’s memory, as it last said (at most a minute old while it heartbeats).

Field

Type

Description

container_bytes (optional)

integer

Its container’s memory; none outside a cgroup v2.

container_limit_bytes (optional)

integer

Its container’s limit; none when unlimited.

tasks_bytes

integer

Its running tasks’ together.

whole_bytes

integer

Its whole memory, in bytes: the agent, its fork servers, wait step hosts and running tasks.

WorkerNodeView

A worker as a node of the deployment.

Field

Type

Description

config (optional)

table

Its effective configuration, masked; none from an older agent.

master_id (optional)

string

The master it registered with last; none from an older agent.

problems (optional)

list of ProblemView

Its problems now: lost or offline (errors), what it reports wrong, the import errors of files it parsed (warnings).

process_id (optional)

string

The process it runs in; none from an older agent.

queues (optional)

list of strings

The queues it serves.

running (optional)

integer

Its attempts still running.

schedr_version

string

Its schedr version.

slots (optional)

integer

Its task slots (decision 462; 0 from an older webserver).

state

string

active, draining, disconnected, offline or lost.

usage (optional)

any

worker_id

string

Its ID.

WorkerPartsView

A worker’s memory by part and its largest tasks.

Field

Type

Description

at

timestamp

When sampled.

fork_servers_bytes

integer

Its fork servers’, together.

largest_tasks (optional)

list of TaskMemoryView

The largest of them, largest first.

tasks_bytes

integer

Its running tasks’, together.

watcher_hosts_bytes

integer

Its wait step hosts’, together.

WorkerUsageView

A worker’s memory by part (decision 463), as it last said (written at most once a minute).

Field

Type

Description

fork_servers_bytes

integer

Its fork servers’, together.

largest_tasks (optional)

list of TaskMemoryView

The largest of them, largest first.

process

NodeUsageView

The agent’s own process (in standalone the master’s and the webserver’s too).

tasks_bytes

integer

Its running tasks’, together.

watcher_hosts_bytes

integer

Its wait step hosts’, together.

WorkerView

A worker in the registry (kept after it is gone, so its logs can be found).

Field

Type

Description

drained

boolean

Drained for maintenance (schedr workers drain): no new tasks until resumed.

incarnation_id

string

The incarnation of its agent process it last registered with.

last_heartbeat_at

timestamp

The last sign of life the master recorded (at most once per heartbeat interval).

log_endpoint

string

Where its log endpoint listens (where a gone worker’s logs were served).

master_id (optional)

string

The master it registered with last (a master’s ID, as on GET /api/v1/deployment): kept while it is disconnected; none from an older agent’s registration.

memory (optional)

any

offline_at (optional)

timestamp

When it went offline or was lost.

protocol_version

string

Its protocol version (major.minor).

queues

list of strings

The queues it serves.

registered_at

timestamp

When it last registered.

running

integer

Its attempts still running.

schedr_version

string

Its schedr version.

slots

integer

Its task slots.

state

string

active, draining, disconnected, offline or lost.

warnings (optional)

list of WarningView

What is wrong with it now, as it last reported (e.g. a disabled fork server).

watcher_hosts (optional)

list of WatcherHostView

The processes running its wait steps, as its last heartbeat said (decision 343), and code sets whose hosts were lost.

watcher_slots (optional)

integer

Its slots for wait steps.

worker_id

string

Its ID.