foliot docs

API reference / Reference / Schemas

Schemas

Every request and response type in the API.

App

object
createdAt
string (date-time)
REQUIRED
description
string,null
REQUIRED
handlerBaseUrl
string (uri)
REQUIRED
id
string
REQUIRED
name
string
REQUIRED
updatedAt
string (date-time)
REQUIRED

AuditEntry

object
action
"api_key.rotated" | "signing_secret.revealed" | "signing_secret.rotated"
REQUIRED
actor
string
REQUIRED
actorKind
"operator" | "app" | "user"
REQUIRED

What sort of actor: user for a person (actor is user:<clerk id>), app for an app's own key (actor is app:<id>), operator for any other recorded name, which is an operator token's configured name. Taken from the recorded actor, never from actorName.

actorName
string
REQUIRED

What to show for the actor: a person's name where one is known, otherwise the same text as actor. Always present. A person chooses their own name, so it is a label and never an identity: show it with actorKind.

at
string (date-time)
REQUIRED
clientIp
string,null
REQUIRED
id
string (uuid)
REQUIRED
reason
string,null
REQUIRED

BulkAction

object
action
"redrive" | "rewind" | "cancel"
REQUIRED

What to do to every matching run.

dryRun
boolean
OPTIONAL

Answer with just a count, and start nothing.

default false

filter
object
REQUIRED
fromStep
string
OPTIONAL

redrive only: restart from this step rather than where the run failed.

reason
string
OPTIONAL

Recorded on every run this touches.

max length 1000

toStep
string
OPTIONAL

rewind only, and required: the step to rewind to.

version
integer (int64)
OPTIONAL

rewind only: the workflow version to rewind onto.

min 1 · max 2147483647

BulkActionJob

object
action
"redrive" | "rewind" | "cancel"
REQUIRED
actor
string
REQUIRED
appId
string
REQUIRED
cancelReason
string,null
REQUIRED
createdAt
string (date-time)
REQUIRED
done
integer (int64)
REQUIRED
error
string,null
REQUIRED
failed
integer (int64)
REQUIRED
finishedAt
string,null (date-time)
REQUIRED
id
string (uuid)
REQUIRED
params
REQUIRED
status
"pending" | "running" | "completed" | "cancelled" | "failed"
REQUIRED
total
integer (int64)
REQUIRED

Cancel

object
reason
string
OPTIONAL

max length 1000

Duration

string | number

A length of time, written the way people say it: "10s", "3d", "1h30m", "250ms". A bare number is milliseconds.

The ceiling is 9223372036854 ms, about 292 years — what a 64-bit nanosecond counter holds. Anything longer is refused, in either spelling. It is stated here because a limit the server enforces and the document omits is a client that validates, complies, and is rejected anyway.

EditState

object
patch
map of any
REQUIRED
reason
string
OPTIONAL

max length 1000

Error

object

Every error the server emits, including the framework’s own validation failures. code is the closed enum above and is what a client should branch on. details is present only on a 4xx, where it describes what the CALLER got wrong; a 5xx never carries it, because the only thing it could carry is an internal message.

error
object
REQUIRED

MetricDefinition

object
description
string
REQUIRED
labels
string[]
REQUIRED

Every label a series of this metric carries, in order. Always starts with app and workflow.

name
string
REQUIRED

Prometheus-compatible: snake_case with a foliot_ prefix; a counter ends in _total.

source
"rollup" | "live"
REQUIRED

rollup: counted into minute, hour and day buckets from Foliot's own tables, so it has history; live: read at the moment it is asked, so it has none yet.

type
"counter" | "gauge" | "distribution"
REQUIRED

counter: a count per bucket, which only adds up; gauge: a value at an instant.

unit
string
REQUIRED

What one unit of the value is: runs, attempts, seconds.

MetricPoint

object
at
string (date-time)
REQUIRED

The start of the bucket (UTC), or for a live gauge the moment it was read.

cumulative
number (double)
OPTIONAL

A counter's running total from the first bucket of the range through this one. Absent for a gauge.

value
number (double)
REQUIRED

A counter's count in this bucket; a gauge's value.

MetricSeries

object
labels
map of string
REQUIRED

The value of each of the metric's labels.

points
REQUIRED

For a rollup metric, one point for every bucket in the range, zero where nothing was counted. For a live gauge, one point.

total
number (double)
OPTIONAL

A counter's sum over the whole range. Absent for a gauge.

MyWorkspace

object

A workspace the signed-in person belongs to, and their role in it.

id
string (uuid)
REQUIRED
name
string
REQUIRED
role
"owner" | "operator" | "viewer"
REQUIRED
slug
string
REQUIRED

Principal

Who a bearer token belongs to.

PrincipalApp

object
appId
string
REQUIRED
kind
"app"
REQUIRED

PrincipalOperator

object
kind
"operator"
REQUIRED
name
string
REQUIRED

The operator's name, from FOLIOT_OPERATOR_TOKENS.

PrincipalUser

object

A signed-in person. workspaces is read from the database on every call, never from the token, and is empty for someone who has signed in but belongs to none (they can see nothing). name and email are absent until the profile has been mirrored. truncated is true only when the person belongs to more workspaces than are listed (the first 200 by slug): the list is then not the whole of it. canCreateWorkspace says whether they may make their own first workspace.

canCreateWorkspace
boolean
OPTIONAL

Whether this person may make their own first workspace with POST /me/workspaces: they have never belonged to one. false for a person who belongs to a workspace and for one who was removed from theirs, so a screen offers the form only to someone the server will accept. Read now, after any invitation has joined them.

email
string
OPTIONAL
kind
"user"
REQUIRED
name
string
OPTIONAL
truncated
boolean
OPTIONAL
userId
string (uuid)
REQUIRED
workspaces
REQUIRED

Reason

object
reason
string
OPTIONAL

Why. Optional; recorded with the action.

max length 1000

Redrive

object
fromStep
string
OPTIONAL

Defaults to the run's current step.

reason
string
OPTIONAL

max length 1000

RegisterApp

object
description
string
OPTIONAL

max length 500

handlerBaseUrl
string (uri)
REQUIRED

Where tasks are pushed.

name
string
REQUIRED

The app's name. With POST /apps it also becomes the app's id; in a workspace the id is generated and the name only has to be unique in that workspace. Lower-case kebab.

min length 1 · max length 100 · pattern ^[a-z0-9][a-z0-9-]*$

RegisteredWorkflow

object
createdAt
string (date-time)
REQUIRED
id
integer (int64)
REQUIRED
name
string
REQUIRED
version
integer (int64)
REQUIRED

Rewind

object
reason
string
OPTIONAL

max length 1000

toStep
string
REQUIRED

min length 1

version
integer (int64)
OPTIONAL

min 1 · max 2147483647

Run

object
appId
string
REQUIRED
attempt
integer (int64)
REQUIRED
businessKey
string,null
REQUIRED
compacted
boolean
REQUIRED
createdAt
string (date-time)
REQUIRED
currentStep
string,null
REQUIRED
error
RunError | null
REQUIRED
finishedAt
string,null (date-time)
REQUIRED
generation
integer (int64)
REQUIRED
id
string (uuid)
REQUIRED
idempotencyKey
string,null
REQUIRED
input
any
REQUIRED
scheduledAt
string,null (date-time)
REQUIRED
state
map of any
REQUIRED
status
REQUIRED
tags
string[]
REQUIRED
updatedAt
string (date-time)
REQUIRED
waitReason
null | "paused" | "signal" | "task"
REQUIRED
waitSignal
string,null
REQUIRED
workflowName
string
REQUIRED
workflowVersion
integer (int64)
REQUIRED

RunError

object
attempt
integer
OPTIONAL
class
string
OPTIONAL

Matched against a retry policy's retryOn. Engine-set classes include timeout, wait_timeout, run_timeout and cancelled; handlers may set their own.

message
string
REQUIRED
retryable
boolean
OPTIONAL
step
string
OPTIONAL

RunEvent

One entry of a run’s history. payload varies by type; every variant was observed from a real run (see go/internal/acceptance/captures/_event-payloads.json).

RunEventChoiceEvaluated

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for choice.evaluated.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"choice.evaluated"
REQUIRED

RunEventRunCancelled

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.cancelled.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.cancelled"
REQUIRED

RunEventRunCompacted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.compacted.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.compacted"
REQUIRED

RunEventRunFailed

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.failed.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.failed"
REQUIRED

RunEventRunRedriven

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.redriven.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.redriven"
REQUIRED

RunEventRunRepinned

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.repinned.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.repinned"
REQUIRED

RunEventRunRewound

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.rewound.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.rewound"
REQUIRED

RunEventRunSleeping

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.sleeping.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.sleeping"
REQUIRED

RunEventRunStarted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.started.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.started"
REQUIRED

RunEventRunStuck

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.stuck.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.stuck"
REQUIRED

RunEventRunSucceeded

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
map of any
REQUIRED

Payload written for run.succeeded.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.succeeded"
REQUIRED

RunEventRunWaiting

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for run.waiting.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"run.waiting"
REQUIRED

RunEventSignalReceived

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for signal.received.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"signal.received"
REQUIRED

RunEventStateEdited

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for state.edited.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"state.edited"
REQUIRED

RunEventStepCompleted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for step.completed.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.completed"
REQUIRED

RunEventStepExhausted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for step.exhausted.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.exhausted"
REQUIRED

RunEventStepParked

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for step.parked.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.parked"
REQUIRED

RunEventStepReleased

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for step.released.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.released"
REQUIRED

RunEventStepSkipped

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for step.skipped.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.skipped"
REQUIRED

RunEventStepStarted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
map of any
REQUIRED

Payload written for step.started.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"step.started"
REQUIRED

RunEventTaskAcked

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for task.acked.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"task.acked"
REQUIRED

RunEventTaskCompleted

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for task.completed.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"task.completed"
REQUIRED

RunEventTaskDispatched

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for task.dispatched.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"task.dispatched"
REQUIRED

RunEventTaskFailed

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for task.failed.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"task.failed"
REQUIRED

RunEventTaskTimedOut

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for task.timed_out.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"task.timed_out"
REQUIRED

RunEventWaitTimedOut

object
actor
string
REQUIRED

foliot for engine actions, otherwise the operator name.

at
string (date-time)
REQUIRED
attempt
integer,null
OPTIONAL
generation
integer
REQUIRED

Bumped by redrive and rewind, so re-runs of a step stay distinguishable.

id
integer
REQUIRED

Monotonic across the engine; use seq for per-run ordering.

payload
object
REQUIRED

Payload written for wait.timed_out.

runId
string (uuid)
REQUIRED
seq
integer
REQUIRED

Position within this run's history, starting at 1.

step
string,null
OPTIONAL
type
"wait.timed_out"
REQUIRED

RunStatus

"running" | "sleeping" | "waiting" | "succeeded" | "failed" | "cancelled" | "stuck"

running is being worked on; sleeping and waiting are parked and cost nothing; stuck means the run outlived its runTimeout. Succeeded, failed and cancelled are terminal.

SecretAction

object
reason
string
REQUIRED

Why. Required, and recorded.

min length 8 · max length 1000

Signal

object
key
string
OPTIONAL

Dedupe key. A repeat with the same key is reported duplicate, not delivered again.

max length 200

name
string
REQUIRED

min length 1 · max length 100

payload
any
OPTIONAL

SignalByKey

object
businessKey
string
REQUIRED

min length 1

key
string
OPTIONAL

Dedupe key. A repeat with the same key is reported duplicate, not delivered again.

max length 200

name
string
REQUIRED

min length 1 · max length 100

payload
any
OPTIONAL
workflow
string
REQUIRED

min length 1

SignalResult

object
buffered
boolean
REQUIRED
delivered
boolean
REQUIRED
duplicate
boolean
REQUIRED

Skip

object
output
any
OPTIONAL

Overrides the placeholder, for a step whose output the next one needs.

reason
string
REQUIRED

min length 1 · max length 1000

StartRun

object
businessKey
string
OPTIONAL

Your own identifier, for signalling later without tracking run ids.

max length 200

idempotencyKey
string
OPTIONAL

max length 200

input
any
OPTIONAL
startAfter
OPTIONAL
tags
string[]
OPTIONAL

max 20 items

version
integer (int64)
OPTIONAL

min 1 · max 2147483647

workflow
string
REQUIRED

min length 1

StepControl

object
paused
boolean
REQUIRED
reason
string
OPTIONAL

max length 1000

resumeRatePerSecond
number (double)
OPTIONAL

min 0.1 · max 10000

StepControlState

object
actor
string,null
REQUIRED
appId
string
REQUIRED
paused
boolean
REQUIRED
reason
string,null
REQUIRED
step
string
REQUIRED
updatedAt
string (date-time)
REQUIRED
workflowName
string
REQUIRED

StepOccupancy

object
running
integer (int64)
REQUIRED

Being worked on right now.

sleeping
integer (int64)
REQUIRED

Parked on a sleep step.

step
string
REQUIRED
total
integer (int64)
REQUIRED

Unfinished runs sitting at this step.

waiting
integer (int64)
REQUIRED

Parked on a wait step, or on an async task.

TaskComplete

object
next
string
OPTIONAL

Override the definition's next step. Must name a real step or a sentinel.

max length 100

output
any
OPTIONAL

TaskFail

object
error
object
REQUIRED

TaskPayload

object
appId
string
REQUIRED
attempt
integer (int64)
REQUIRED
businessKey
string,null
REQUIRED
deadline
string (date-time)
REQUIRED

After this the attempt is abandoned as timed out.

generation
integer (int64)
REQUIRED
idempotencyKey
string
REQUIRED

{runId}:{generation}:{step}:{attempt}.

input
any
REQUIRED

The run's input.

runId
string (uuid)
REQUIRED
state
map of any
REQUIRED

Earlier steps' outputs, keyed by step name.

step
string
REQUIRED
taskToken
string (uuid)
REQUIRED

Complete or fail the task with this.

traceparent
string
REQUIRED

W3C traceparent whose trace id is the run id.

workflowName
string
REQUIRED
workflowVersion
integer (int64)
REQUIRED

UpdateApp

object
description
string
OPTIONAL

max length 500

handlerBaseUrl
string (uri)
OPTIONAL

WorkflowDefinition

object
description
string
OPTIONAL

max length 1000

name
string
REQUIRED

min length 1 · max length 100 · pattern ^[a-z0-9][a-z0-9-]*$

retry
object
OPTIONAL
runTimeout
OPTIONAL
steps
object[]
REQUIRED

min 1 items · max 200 items

version
integer
REQUIRED

min 1 · max 2147483647

WorkflowDefinitionNode

object

A condition tree. and, or and not may nest at most 32 levels deep; a deeper tree is refused. A node has exactly one shape (a comparison, and, or or not); one carrying more than one is refused. A schema cannot express either rule, so they are stated here instead.

WorkflowHealth

object
byStatus
map of integer (int64)
REQUIRED

Run counts keyed by status; statuses with no runs are absent.

failedLast24h
integer (int64)
REQUIRED

Runs that reached failed in the last 24 hours.

oldestDueAgeMs
number,null (double)
REQUIRED

Age of the oldest due-but-unprocessed run. The scheduler-lag signal.

p50DurationMs
number,null (double)
REQUIRED
p95DurationMs
number,null (double)
REQUIRED
pausedSteps
string[]
REQUIRED
steps
REQUIRED
succeededLast24h
integer (int64)
REQUIRED
versions
integer (int64)[]
REQUIRED
workflow
string
REQUIRED

WorkflowSummary

object
description
string,null
REQUIRED
latestVersion
integer (int64)
REQUIRED
name
string
REQUIRED
pausedSteps
string[]
REQUIRED
steps
string[]
REQUIRED
versions
integer (int64)[]
REQUIRED

WorkspaceMember

object
clerkUserId
string
REQUIRED

The person's Clerk user id (user_...): what the credential history records as user:<id>.

email
string
OPTIONAL

Absent until the person's profile has been mirrored from Clerk.

joinedAt
string (date-time)
REQUIRED
name
string
OPTIONAL

Absent until the person's profile has been mirrored from Clerk.

role
"owner" | "operator" | "viewer"
REQUIRED
userId
string (uuid)
REQUIRED

Foliot's id for the person: the id the role and removal routes take.

WorkspaceSummary

object
apps
integer (int64)
REQUIRED

How many apps it holds.

createdAt
string (date-time)
REQUIRED
id
string (uuid)
REQUIRED
members
integer (int64)
REQUIRED

How many people belong to it, in any role.

name
string
REQUIRED
owners
integer (int64)
REQUIRED

How many of them are owners.

slug
string
REQUIRED