Skip to content

Trigger a new run

POST
/api/tasks/{taskName}/run
curl --request POST \
--url 'http://localhost:9477/api/tasks/example/run?waitTimeout=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.

waitTimeout

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 typeapplication/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 typeapplication/json
object
$schema

A URL to the JSON Schema for this object.

string format: uri
createdAt
required
string format: date-time
endAt
string format: date-time
endReason

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
exitCode
required
integer format: int64
externalExecutionId
string
id
required
string
instanceIndex
required
integer format: int64
params
object
key
additional properties
string
retryAttempt
required
integer format: int64
retryOfRunId
string
startAt
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 cloud service startup
Example
{
"$schema": "http://localhost:9477/schemas/Run.json",
"endReason": "success",
"status": "pending",
"triggeredBy": "cron"
}

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"
}