Skip to content

Fetch a cron schedule

View as Markdown
GET
/v1/schedules/{triggerId}
curl --request GET \
--url https://example.com/v1/schedules/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'
triggerId
required
string format: uuid

TriggerId — the trigger id (a UUID).

upcoming
integer
>= 1 <= 20

Include the next N occurrences (upcoming), 1 to 20.

Schedule record.

Media typeapplication/json

A schedule: what it runs (a flow at a version, or an agent), when (a cron expression in a timezone), as whom (its owner), and what it does after a gap or while a run is still going.

object
scheduleId
required

Domain-friendly alias for triggerId — the trigger id (a UUID). Use interchangeably in admin URLs.

string
triggerId
required
string
flowId

A schedule that runs a flow: the flow, at flowVersion.

string
>= 1 characters
flowVersion
string
>= 1 characters
agentId

A schedule that runs an agent: the agent, at agentVersion, else its version live for the schedule’s project (else the latest), as a run that names none.

string
>= 1 characters
agentVersion
string
>= 1 characters
improve

A schedule that starts Improve runs: on this agent, for this scope, when enough answers have been marked wrong since its last Improve run (input: the threshold, the monthly cap and the Improve options).

object
agentId
required
string
>= 1 characters
scope
required
One of: discriminator: kind

The agent’s default for the whole tenant.

object
kind
required
string
Allowed values: tenant
projectId

The schedule’s project: its runs are this project’s.

string format: uuid
owner

Who its runs act as. A person: a personal trigger, which only they or a project admin change. A service account: a shared trigger. Only a take-over (POST …/owner) changes it. Checked again at every fire.

object
kind
required
string
Allowed values: user service
id
required
string
displayName

The owner’s name at the time of the response: the person’s display name, or the service account’s name. Absent when it can’t be read (no directory, a removed account) and from a runtime before Kindgi 0.1.6: show the id then.

string
isProjectAccount

Set when the owner is the trigger’s project’s own service account (runAsProject): the trigger is shared, and runs as the project. Show it as “This project”. Absent otherwise.

boolean
cronExpression
required

5- or 6-field cron expression (croner-compatible). 6-field enables second precision.

string
>= 1 characters
timezone

IANA timezone (e.g. UTC, America/New_York). Absent → UTC.

string
input

Static input handed to the run on every fire. Absent → {}.

catchUp

After a gap (the runtime was down, or a fire is later than startingDeadlineSeconds): latest runs once, for the latest missed occurrence, and its fire says how many it missed; skip drops the missed occurrences. Never a run per missed occurrence. A tenant’s suspension isn’t caught up either way: once the tenant is restored, a schedule that’s on fires next at its first occurrence after the restore.

string
Allowed values: latest skip
overlap

When an occurrence comes while the previous run of this schedule is still running: skip records the fire as skipped; allow starts another run.

string
Allowed values: skip allow
startingDeadlineSeconds

How late a fire may start and still count as on time; past it, catchUp applies.

integer
>= 1
label
required
string | null
status
required

Lifecycle status. Only active triggers fire. Tombstoned rows are excluded from every read path.

string
Allowed values: active paused
statusReason

Why the runtime paused it: repeated fires that were refused (the owner lost access) or failed. Skipped fires (an overlap, an erasure in progress) never count.

string
toolsAllowedUnattended

The tools whose calls in this schedule’s runs don’t wait for a person’s yes, though a tool asks for one in a run no person started (needsApprovalWhenUnattended). Absent: none. Each tool by its id, with no wildcard or pattern, and only tools this trigger’s flow or agent calls. It lifts only that wait: the tenant’s approval rules, the agent’s own rules, the permission check (as the trigger’s owner) and the tool’s own limits all still apply.

Array<string>
<= 100 items unique items
nextFireAt
required

Wall-clock time of the next scheduled fire. null on paused rows if the cron scheduler never re-armed.

string | null format: date-time
upcoming

The next occurrences, when the request asked for them (?upcoming=N).

Array<string>
lastFiredAt
required
string | null format: date-time
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"improve": {
"scope": {
"kind": "tenant"
}
},
"owner": {
"kind": "user",
"isProjectAccount": true
},
"catchUp": "latest",
"overlap": "skip",
"status": "active"
}

Missing / malformed / expired / revoked bearer token.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

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

No cron trigger with that id, or the row was tombstoned.

Media typeapplication/json
object
error
required
object
code
required

Stable machine-readable discriminant. Values match domain error codes (see docs/API-ROUTE-CONVENTIONS.md §4.3).

string
message
required
string
details

Optional, kind-specific.

object
key
additional properties
any
requestId
required

Server-assigned request id; also echoed via X-Request-Id header.

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

See also