Skip to main content
POST /api/v1/cloud/environments/{environment_id}/work/{work_id}/stop Stops a work item. The request body is optional; an empty body or {} sends the default force=false request, also called a graceful stop. For starting or active items, force=false moves the item to stopping. The worker should drain the in-flight work, then call this endpoint again to confirm completion and move the item to stopped. force=true moves any live item directly to stopped.

Path parameters

Headers

Request body

Example request: force=false

Example request: force=true

Example response

HTTP 200 OK

Response fields

Returns the updated Work item object.

Errors

See Errors for the full error envelope.

State transitions

force=false means an empty body, {}, or {"force": false}. force=true means {"force": true}.

Cloud environment setup

Choose the container, network, and dependencies your agent runs in.