Skip to content

Stop a service for the daemon's lifetime, or a task's runs

POST
/api/tasks/{taskName}/stop
curl --request POST \
--url 'http://localhost:9477/api/tasks/example/stop?waitTimeout=120'

For a service: cancels every live instance and marks it stopped; the supervisor stops refilling slots until a restart is issued or the daemon is restarted. For a task: cancels any active run and drops anything queued; the cron schedule keeps firing (pause it with POST /api/tasks/{taskName}/pause). With wait=true: returns once everything has ended, or 409 if that takes longer than waitTimeout.

taskName
required

Task name

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

Task name

wait

Hold the request until the action finishes. run, and start/restart on a task: until the run ends, then return it with exitCode and endReason. stop: until every run or instance has ended. Not supported for start/restart on a service. Best for short tasks; long waits may exceed reverse-proxy timeouts.

boolean

Hold the request until the action finishes. run, and start/restart on a task: until the run ends, then return it with exitCode and endReason. stop: until every run or instance has ended. Not supported for start/restart on a service. Best for short tasks; long waits may exceed reverse-proxy timeouts.

waitTimeout

With wait=true, the maximum seconds to hold the request open. Capped below the server’s 5-minute write timeout. On timeout, run/start/restart return the run in its current (non-terminal) state and stop returns 409; the action itself keeps going.

integer format: int64
default: 120 >= 1 <= 240

With wait=true, the maximum seconds to hold the request open. Capped below the server’s 5-minute write timeout. On timeout, run/start/restart return the run in its current (non-terminal) state and stop returns 409; the action itself keeps going.

No Content

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