Skip to content
Skip to Content
Coder Docs

Update workspace build state

PUT
/api/v2/workspacebuilds/{workspacebuild}/state

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

workspacebuild*string

Workspace build ID

Formatuuid

Request Body

Request body

application/json
  1. body
state?array<integer>

Response Body

No Content

The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.

curl -X PUT \	"$CODER_URL/api/v2/workspacebuilds/{workspacebuild}/state" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "state": [    0  ]}'
Example Response204
Empty