SLA policies
SLA policies: 5 operations of the ChaosDesk REST API.
- GET
/api/sla_policiesRetrieves the collection of SlaPolicy resources. - POST
/api/sla_policiesCreates a SlaPolicy resource. - GET
/api/sla_policies/{id}Retrieves a SlaPolicy resource. - PATCH
/api/sla_policies/{id}Updates the SlaPolicy resource. - DELETE
/api/sla_policies/{id}Removes the SlaPolicy resource.
Retrieves the collection of SlaPolicy resources.
Responses
200SlaPolicy collection403Forbidden
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.
Request body application/json
conditionsobjecttargetsobject[]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).
titlestringrequireddescriptionstring | nullactivebooleanpositioninteger
Responses
201SlaPolicy resource created400Invalid input403Forbidden422An 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.
Parameters
idstringpathrequired- SlaPolicy identifier
Responses
200SlaPolicy resource403Forbidden404Not 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.
Parameters
idstringpathrequired- SlaPolicy identifier
Request body application/merge-patch+json
conditionsobjecttargetsobject[]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).
titlestringdescriptionstring | nullactivebooleanpositioninteger
Responses
200SlaPolicy resource updated400Invalid input403Forbidden404Not found422An 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.
Parameters
idstringpathrequired- SlaPolicy identifier
Responses
204SlaPolicy resource deleted403Forbidden404Not found
Example request
curl -X DELETE "https://yourcompany.chaosdesk.io/api/sla_policies/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json"