Skip to content

Trigger a new run

POST
/api/tasks/{taskName}/run
curl --request POST \
--url 'http://localhost:9477/api/tasks/example/run?wait_timeout=300' \
--header 'Content-Type: application/json' \
--data '{ "params": { "additionalProperty": "example" } }'

Triggers the task and returns the pending run immediately. Pass wait=true to instead hold the request open until the run finishes and return it with its exit code and end reason — a one-call alternative to triggering then polling.

taskName
required

Task name

string
>= 1 characters <= 100 characters /^[a-zA-Z0-9._:-]+$/

Task name

wait

Block until the run finishes and return the completed run (with exit_code and end_reason). Best for short tasks; long runs may exceed reverse-proxy timeouts — follow the log stream or poll instead.

boolean

Block until the run finishes and return the completed run (with exit_code and end_reason). Best for short tasks; long runs may exceed reverse-proxy timeouts — follow the log stream or poll instead.

wait_timeout

With wait=true, the maximum seconds to hold the request open. On timeout the run keeps running and the response returns it in its current (non-terminal) state.

integer format: int64
default: 300 >= 1 <= 3600

With wait=true, the maximum seconds to hold the request open. On timeout the run keeps running and the response returns it in its current (non-terminal) state.

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
params

Values for the task’s declared parameters, keyed by parameter identity. A null value omits that parameter (overriding its default); an empty string passes an empty value; an absent key uses the declared default.

object
key
additional properties
string | null

Created

Media type application/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
created_at
required
string format: date-time
end_at
string format: date-time
end_reason

Why a run ended. Set when status=ended.

string
Allowed values: success failed stopped timeout crashed skipped log_overflow queue_full dst_skipped daemon_stopped missed start_failed
exit_code
required
integer format: int64
external_execution_id
string
id
required
string
instance_index
required
integer format: int64
params
object
key
additional properties
string
retry_attempt
required
integer format: int64
retry_of_run_id
string
start_at
string format: date-time
status
required

Run lifecycle phase

string
Allowed values: pending running ended
task_name
required
string
triggered_by
required

How the run was triggered

string
Allowed values: cron api cloud service startup
Example
{
"$schema": "http://localhost:9477/schemas/Run.json",
"end_reason": "success",
"status": "pending",
"triggered_by": "cron"
}

Error

Media type application/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 | 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"
}