Triggers

Triggers: 5 operations of the ChaosDesk REST API.

Retrieves the collection of Trigger resources.

GET/api/triggers

Responses

  • 200Trigger collection
  • 403Forbidden

Example request

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

Creates a Trigger resource.

POST/api/triggers

Request body application/json

conditionsobject
actionsobject[]
categorystring | null (iri-reference)
Zendesk trigger category (null = uncategorised, runs before every category).
titlestringrequired
descriptionstring | null
activeboolean
positioninteger

Responses

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

Example request

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

Retrieves a Trigger resource.

GET/api/triggers/{id}

Parameters

idstringpathrequired
Trigger identifier

Responses

  • 200Trigger resource
  • 403Forbidden
  • 404Not found

Example request

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

Updates the Trigger resource.

PATCH/api/triggers/{id}

Parameters

idstringpathrequired
Trigger identifier

Request body application/merge-patch+json

conditionsobject
actionsobject[]
categorystring | null (iri-reference)
Zendesk trigger category (null = uncategorised, runs before every category).
titlestring
descriptionstring | null
activeboolean
positioninteger

Responses

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

Example request

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

Removes the Trigger resource.

DELETE/api/triggers/{id}

Parameters

idstringpathrequired
Trigger identifier

Responses

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

Example request

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