Skip to content

List all tasks

GET
/api/tasks
curl --request GET \
--url http://localhost:9477/api/tasks

OK

Media typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
items
required

List of tasks

Array<object> | null
object
$schema

A URL to the JSON Schema for this object.

string format: uri
autostart
required

For services: whether instances start at boot. False boots in the stopped state until started via API/UI. For cron tasks: false starts the schedule paused when the task is first registered, until it is resumed.

boolean
catchUp

Max missed cron ticks to re-run at startup after downtime: 0 skips, 1 re-runs only the most recent, N re-runs up to the N most recent

integer format: int64
compose

Provenance metadata for tasks imported from a docker compose file

object
file
required
string
projectName
required
string
service
string
cron
string
dependsOn

For services: service names that must be healthy before this one starts at boot — boot ordering only, not a workflow DAG

Array<string> | null
description
string
env

Environment variables overlaid on the task’s process env. Values are visible to authenticated operators in the API/UI; env_file values merge in beneath the inline entries.

object
key
additional properties
string
envBase

What the run’s environment starts from: ‘inherit’ (the daemon’s, the default) or ‘clean’ (PATH, SHELL, HOME, USER/LOGNAME only, as crond gives a job)

string
envFile

Path to a dotenv file whose KEY=VALUE pairs merge into env (inline entries win). Values are visible in the API/UI like inline env.

string
gracefulStop

Window between the stop signal and SIGKILL when a run is stopped, in nanoseconds; 0 means kill immediately

integer format: int64
group
string
healthyAfter

For services: an instance that runs at least this long counts as healthy — resets the restart counter and clears the failed-start streak; fast exits below it count toward restart_attempts, in nanoseconds; 0 means healthy immediately on start. With a health_check, the deadline for its first pass instead.

integer format: int64
heldBy

Why this task is loaded but not on the scheduler: ‘cron’ means a live system cron daemon still reads the crontab it came from and is running it, so RunWisp stands down. Manual triggers still work. Empty means RunWisp owns the schedule.

string
Allowed values: cron
instances

For services: number of always-running instances

integer format: int64
jitter

Cap how far a cron task’s start may slip so tasks sharing a fire time take turns through a daemon-wide one-at-a-time gate instead of stampeding; a run starts as soon as the gate frees and slips up to this window only under contention, in nanoseconds

integer format: int64
keepFor

Retention window in nanoseconds; 0 means no cap was configured

integer format: int64
keepRuns

Row-count retention cap; 0 keeps no completed runs, omitted inherits the [defaults] value (or no cap)

integer format: int64
kind

Whether this is a scheduled task or an always-on service

string
Allowed values: task service
lastRun

The newest run of this task that started (pending, skipped and missed runs don’t count); absent when none has.

object
$schema

A URL to the JSON Schema for this object.

string format: uri
cpuTimeMs

User plus system CPU time of the run’s processes, in milliseconds. Shell runs only; absent when not measured.

integer format: int64
createdAt
required
string format: date-time
endReason

Why a run ended. Set when status=ended.

string
Allowed values: succeeded failed stopped timeout crashed skipped log_overflow queue_full dst_skipped daemon_stopped missed start_failed unhealthy
endedAt
string format: date-time
executionId
string
exitCode
required
integer format: int64
id
required
string
instanceIndex
required
integer format: int64
isFailure
required
boolean
params
object
key
additional properties
string
peakMemoryBytes

Highest resident memory of the run’s process group, in bytes. Shell runs only; absent when not measured.

integer format: int64
retryAttempt
required
integer format: int64
retryOfRunId
string
startedAt
string format: date-time
status
required

Run lifecycle phase

string
Allowed values: pending running ended
taskName
required
string
triggeredBy
required

How the run was triggered

string
Allowed values: cron api ui cli station service startup hook
logMaxSize

Per-run log size cap in bytes

integer format: int64
logOnFull

What to do when log output exceeds log_max_size

string
Allowed values: drop_new drop_old kill
manualTrigger
required
boolean
maxConcurrent

Maximum overlapping runs allowed for this task

integer format: int64
maxQueued

Maximum runs that can wait when on_overlap = queue; 0 means none wait, so a trigger that finds every slot busy is dropped as queue_full

integer format: int64
name
required
string
nextRunAt
string format: date-time
onOverlap

How overlapping runs are handled

string
Allowed values: queue skip kill
parameters

Per-execution parameters an operator may supply at manual trigger time; scheduled runs use the declared defaults

Array<object> | null
object
allowCustom

When choices is set, allow values outside the list

boolean
choices

Allowed values; renders as a dropdown

Array<string> | null
default

Default value used by scheduled runs and pre-filled in manual forms

string
description

Help text shown under the field

string
key
required

Canonical parameter key (env name, positional label, or option/flag token)

string
kind
required

How the parameter renders into the run

string
Allowed values: env arg option flag
required

Whether a manual trigger must supply a value

boolean
type

Value type; defaults to string

string
Allowed values: string number
pausedAt

When an operator paused this task’s cron schedule (POST /api/tasks/{taskName}/pause); absent when not paused. A paused task has no nextRunAt.

string format: date-time
priority

For services: boot start order, lowest first (name breaks ties). Start order only — not a dependency.

integer format: int64
restart

For services: whether and when an instance is restarted (defaults to always). Tasks re-run a failed run via retry_* instead.

string
Allowed values: never always on_failure
restartAttempts

For services: consecutive fast failures tolerated before the instance is marked FATAL; 0 means give up after the very first failure

integer format: int64
restartBackoff

Backoff curve between consecutive restarts

string
Allowed values: constant linear exponential
restartDelay

For services: base delay before each restart, in nanoseconds; 0 means restart instantly

integer format: int64
retryAttempts
integer format: int64
retryBackoff

Backoff curve between consecutive retries

string
Allowed values: constant linear exponential
retryDelay

Base delay before each retry, in nanoseconds; 0 retries with no delay

integer format: int64
run

The run command as written in runwisp.toml; absent for tasks without one (container and compose tasks).

string
runOnStart
required

For tasks: fire once at daemon startup, in addition to any cron schedule

boolean
runOnStartMode

For run_on_start tasks: daemon fires on every daemon start, boot once per machine (or container) boot

string
Allowed values: daemon boot
secretsFile

Path to a dotenv file whose KEY=VALUE pairs are injected into the task’s process env. The path is visible in the API/UI; keys and values are not.

string
service

For services: the supervisor’s view of each instance. Absent for tasks.

object
desiredInstances
required
integer format: int64
instances
required
Array<object> | null
object
index
required

0-based slot, as RUNWISP_INSTANCE_INDEX

integer format: int64
lastExitCode

Exit code of the instance’s latest run; absent until one has exited since the daemon started

integer format: int64
restartCount
required

Exits since the instance last ran healthy

integer format: int64
startFails
required

Failed starts in a row since the instance last ran healthy; it gives up once this passes restartAttempts

integer format: int64
startedAt

When the instance’s current run started; absent unless running

string format: date-time
state
required

Restarting: between an exit and the next respawn; stopped: down until started, because the service was stopped or its restart policy (never, or on_failure after a clean exit) won’t respawn it; fatal: gave up after too many failed starts and won’t respawn until started

string
Allowed values: running restarting stopped fatal
runningInstances
required
integer format: int64
state
required

Stopped: an operator stopped it, autostart = false and it was never started, or every instance exited cleanly and its restart policy won’t respawn it; fatal: no instance is running or respawning, and at least one gave up or exited on a failure; degraded: some instances are down

string
Allowed values: running degraded stopped fatal
serviceStopped

For services: true while the service is stopped (by an operator, never started because autostart = false, or every instance exited cleanly under a restart policy that won’t respawn it) and the daemon will not respawn it until it is started. Absent for running or restarting services and for tasks.

boolean
shell

Absolute path to the shell interpreter for run scripts; defaults to /bin/sh

string
source

Where this task’s definition came from: native (hand-authored TOML), staged (imported, not yet promoted), or cron (read live from a crontab via daemon.include_cron)

string
Allowed values: staged cron
sourceFile

Absolute path of the crontab or staging file this task’s definition was read from; empty for hand-authored TOML

string
stopSignal

Signal sent to stop a run before SIGKILL; defaults to SIGTERM

string
Allowed values: SIGTERM SIGINT SIGQUIT SIGHUP SIGKILL SIGUSR1 SIGUSR2
timeout

Per-run timeout in nanoseconds

integer format: int64
timezone

IANA timezone for cron evaluation; falls back to daemon.timezone, then the daemon’s resolved system timezone

string
umask

Octal file-creation mask applied to the run’s process; empty inherits the daemon’s umask

string
usage

Live CPU and memory use of the task’s running shell runs; absent when none is running or measured.

object
cpuPercent
required

CPU use in percent of one core (200 = two full cores)

number format: double
memoryBytes
required

Resident memory in bytes

integer format: int64
user

Run the process as this OS user, in ‘user’ or ‘user:group’ form (name or numeric id). Empty runs as the daemon’s user; switching users needs the daemon running as root.

string
warnAfter

For tasks: send a long_running notification once when a run is still going after this long, without stopping it, in nanoseconds; 0 means no warning

integer format: int64
workingDir

Resolved working directory for the task’s process; empty inherits the daemon’s working directory. A literal “~” means the run-as user’s home, resolved at run time

string

Example

{
"$schema": "http://localhost:9477/schemas/TasksResponseBody.json",
"items": [
{
"$schema": "http://localhost:9477/schemas/TaskResponse.json",
"heldBy": "cron",
"kind": "task",
"lastRun": {
"$schema": "http://localhost:9477/schemas/Run.json",
"endReason": "succeeded",
"status": "pending",
"triggeredBy": "cron"
},
"logOnFull": "drop_new",
"onOverlap": "queue",
"parameters": [
{
"kind": "env",
"type": "string"
}
],
"restart": "never",
"restartBackoff": "constant",
"retryBackoff": "constant",
"runOnStartMode": "daemon",
"service": {
"instances": [
{
"state": "running"
}
],
"state": "running"
},
"source": "staged",
"stopSignal": "SIGTERM"
}
]
}

Error

Media typeapplication/problem+json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object> | null
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"$schema": "http://localhost:9477/schemas/ErrorModel.json",
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}