Skip to content
Skip to Content
Coder Docs

Update workspace autostart schedule by ID

PUT
/api/v2/workspaces/{workspace}/autostart

Authorization

CoderSessionToken
headerCoder-Session-Token<token>

Path Parameters

workspace*string

Workspace ID

Formatuuid

Request Body

Schedule update request

application/json
  1. body
schedule?string

Schedule is expected to be of the form CRON_TZ=<IANA Timezone> <min> <hour> * * <dow> Example: CRON_TZ=US/Central 30 9 * * 1-5 represents 0930 in the timezone US/Central on weekdays (Mon-Fri). CRON_TZ defaults to UTC if not present.

Response Body

No Content

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

curl -X PUT \	"$CODER_URL/api/v2/workspaces/{workspace}/autostart" \	-H "Coder-Session-Token: $CODER_SESSION_TOKEN" \	-H "Content-Type: application/json" \	-d '{  "schedule": "string"}'
Example Response204
Empty