Holidays

Holidays: 5 operations of the ChaosDesk REST API.

Retrieves the collection of Holiday resources.

GET/api/holidays

Parameters

schedulestringquery
schedule[]string[]query

Responses

  • 200Holiday collection
  • 403Forbidden

Example request

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

Creates a Holiday resource.

POST/api/holidays

Request body application/json

schedulestring (iri-reference)
namestringrequired
datestring (date-time)
recurringboolean

Responses

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

Example request

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

Retrieves a Holiday resource.

GET/api/holidays/{id}

Parameters

idstringpathrequired
Holiday identifier

Responses

  • 200Holiday resource
  • 403Forbidden
  • 404Not found

Example request

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

Updates the Holiday resource.

PATCH/api/holidays/{id}

Parameters

idstringpathrequired
Holiday identifier

Request body application/merge-patch+json

schedulestring (iri-reference)
namestring
datestring (date-time)
recurringboolean

Responses

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

Example request

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

Removes the Holiday resource.

DELETE/api/holidays/{id}

Parameters

idstringpathrequired
Holiday identifier

Responses

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

Example request

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