Business schedules

Business schedules: 5 operations of the ChaosDesk REST API.

Retrieves the collection of BusinessSchedule resources.

GET/api/business_schedules

Responses

  • 200BusinessSchedule collection
  • 403Forbidden

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/business_schedules" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Creates a BusinessSchedule resource.

POST/api/business_schedules

Request body application/json

namestringrequired
timezonestringrequired
intervalsobject
weekday (mon…sun) => ["07:00-19:00", …] in local time
defaultboolean
Used by policies without an explicit schedule.

Responses

  • 201BusinessSchedule resource created
  • 400Invalid input
  • 403Forbidden
  • 422An error occurred

Example request

curl -X POST "https://yourcompany.chaosdesk.io/api/business_schedules" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","timezone":"string"}'

Retrieves a BusinessSchedule resource.

GET/api/business_schedules/{id}

Parameters

idstringpathrequired
BusinessSchedule identifier

Responses

  • 200BusinessSchedule resource
  • 403Forbidden
  • 404Not found

Example request

curl -X GET "https://yourcompany.chaosdesk.io/api/business_schedules/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"

Updates the BusinessSchedule resource.

PATCH/api/business_schedules/{id}

Parameters

idstringpathrequired
BusinessSchedule identifier

Request body application/merge-patch+json

namestring
timezonestring
intervalsobject
weekday (mon…sun) => ["07:00-19:00", …] in local time
defaultboolean
Used by policies without an explicit schedule.

Responses

  • 200BusinessSchedule resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An error occurred

Example request

curl -X PATCH "https://yourcompany.chaosdesk.io/api/business_schedules/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/merge-patch+json" \
  -d '{"name":"string","timezone":"string"}'

Removes the BusinessSchedule resource.

DELETE/api/business_schedules/{id}

Parameters

idstringpathrequired
BusinessSchedule identifier

Responses

  • 204BusinessSchedule resource deleted
  • 403Forbidden
  • 404Not found

Example request

curl -X DELETE "https://yourcompany.chaosdesk.io/api/business_schedules/{id}" \
  -H "Authorization: Bearer $CHAOSDESK_TOKEN" \
  -H "Accept: application/json"