v54

latestSwagger 2.0AGPL-3.0raw.githubusercontent.com2026-08-03397565628.8 KB
Builds

Cancel workspace build

patch/api/v2/workspacebuilds/{workspacebuild}/cancel

Path parameters

workspacebuildstring required

Workspace build ID

Query parameters

expect_status'running' | 'pending'

Expected status of the job. If expect_status is supplied, the request will be rejected with 412 Precondition Failed if the job doesn't match the state when performing the cancellation.

Response

OK

detailstring

Detail is a debug message that provides further insight into why the action failed. This information can be technical and a regular golang err.Error() text.

  • "database: too many open connections"
  • "stat: too many open files"
messagestring

Message is an actionable message that depicts actions the request took. These messages should be fully formed sentences with proper punctuation. Examples:

  • "A user has been created."
  • "Failed to create a user."