SLA policies

SLA policies: 5 operations of the ChaosDesk REST API.

Retrieves the collection of SlaPolicy resources.

GET/api/sla_policies

Responses

  • 200SlaPolicy collection
  • 403Forbidden

Example request

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

Creates a SlaPolicy resource.

POST/api/sla_policies

Request body application/json

conditionsobject
targetsobject[]
schedulestring | null (iri-reference)
Business hours for targets measured in business hours; null = the default schedule.
warning_percentinteger
Scanner warning when this share of a target is used (0 disables warnings).
titlestringrequired
descriptionstring | null
activeboolean
positioninteger

Responses

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

Example request

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

Retrieves a SlaPolicy resource.

GET/api/sla_policies/{id}

Parameters

idstringpathrequired
SlaPolicy identifier

Responses

  • 200SlaPolicy resource
  • 403Forbidden
  • 404Not found

Example request

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

Updates the SlaPolicy resource.

PATCH/api/sla_policies/{id}

Parameters

idstringpathrequired
SlaPolicy identifier

Request body application/merge-patch+json

conditionsobject
targetsobject[]
schedulestring | null (iri-reference)
Business hours for targets measured in business hours; null = the default schedule.
warning_percentinteger
Scanner warning when this share of a target is used (0 disables warnings).
titlestring
descriptionstring | null
activeboolean
positioninteger

Responses

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

Example request

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

Removes the SlaPolicy resource.

DELETE/api/sla_policies/{id}

Parameters

idstringpathrequired
SlaPolicy identifier

Responses

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

Example request

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