Update user quiet hours schedule
PUT
CoderSessionTokenheader
Coder-Session-Token<token>user*stringUser ID
Format
uuidUpdate schedule request
application/json- body
schedule*stringSchedule is a cron expression that defines when the user's quiet hours window is. Schedule must not be empty. For new users, the schedule is set to 2am in their browser or computer's timezone. The schedule denotes the beginning of a 4 hour window where the workspace is allowed to automatically stop or restart due to maintenance or template schedule.
The schedule must be daily with a single time, and should have a timezone specified via a CRON_TZ prefix (otherwise UTC will be used).
If the schedule is empty, the user will be updated to use the default schedule.
OK
application/json- response
[index: integer]?The samples read CODER_URL and CODER_SESSION_TOKEN: set up your environment.
curl -X PUT \ "$CODER_URL/api/v2/users/{user}/quiet-hours" \ -H "Coder-Session-Token: $CODER_SESSION_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "schedule": "string"}'Example Response200
[ { "next": "2019-08-24T14:15:22Z", "raw_schedule": "string", "time": "string", "timezone": "string", "user_can_set": true, "user_set": true }]