Skip to Content

Stop Pipeline

POST/v0/pipelines/{pipeline_name}/stop
Authentication
Parameters

Stop the pipeline asynchronously by updating the desired state.

There are two variants:

  • /stop?force=false (default): the pipeline will first atomically checkpoint before deprovisioning the compute resources. When resuming, the pipeline will start from this
  • /stop?force=true: the compute resources will be immediately deprovisioned. When resuming, it will pick up the latest checkpoint made by the periodic checkpointer or by a prior /checkpoint call.

The endpoint returns immediately after setting the desired state to Suspended for ?force=false or Stopped for ?force=true. In the former case, once the pipeline has successfully passes the Suspending state, the desired state will become Stopped as well. The procedure to get to the desired state is performed asynchronously. Progress should be monitored by polling the pipeline GET endpoints.

Note the following:

  • The suspending that is done with /stop?force=false is not guaranteed to succeed:
  • If an error is returned during the suspension, the pipeline will be forcefully stopped with that error set
  • Otherwise, it will keep trying to suspend, in which case it is possible to cancel suspending by calling /stop?force=true
  • /stop?force=true cannot be cancelled: the pipeline must first reach Stopped before another action can be done
  • A pipeline which is in the process of suspending or stopping can only be forcefully stopped

Authentication

SchemeTypeDetails
JSON web token (JWT) or API keyBearer tokenAuthorization header · Use a JWT token obtained via an OAuth2/OIDC login workflow or an API key obtained via the `/v0/api-keys` endpoint.

Parameters

Path parameters

NameTypeRequiredDescription
pipeline_namestringYesUnique pipeline name

Query parameters

NameTypeRequiredDescription
forcebooleanNoThe `force` parameter determines whether to immediately deprovision the pipeline compute resources (`force=true`) or first attempt to atomically checkpoint before doing so (`force=false`, which is the default).

Response

Action is accepted and is being performed
Request
curl -X POST '/v0/pipelines/{pipeline_name}/stop?force=%3Cforce%3E' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
Action could not be performed
{ "message": "Deployment resources status (current: 'Stopping', desired: 'Stopped') cannot have desired changed to 'Provisioned'. Cannot restart the pipeline while it is stopping. Wait for it to stop before starting a new instance of the pipeline.", "error_code": "IllegalPipelineAction", "details": { "status": "Stopping", "current_desired_status": "Stopped", "new_desired_status": "Provisioned", "hint": "Cannot restart the pipeline while it is stopping. Wait for it to stop before starting a new instance of the pipeline." } }