Macros
Macros: 5 operations of the ChaosDesk REST API.
- GET
/api/macrosRetrieves the collection of Macro resources. - POST
/api/macrosCreates a Macro resource. - GET
/api/macros/{id}Retrieves a Macro resource. - PATCH
/api/macros/{id}Updates the Macro resource. - DELETE
/api/macros/{id}Removes the Macro resource.
Retrieves the collection of Macro resources.
Responses
200Macro collection403Forbidden
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/macros" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Creates a Macro resource.
Request body application/json
sharedboolean | null- Write-only switch: false makes it personal to the current agent (set by PersonalRuleProcessor).
actionsobject[]titlestringrequireddescriptionstring | nullactivebooleanpositionintegerrestricted_groupsstring (iri-reference)[]
Responses
201Macro resource created400Invalid input403Forbidden422An error occurred
Example request
curl -X POST "https://yourcompany.chaosdesk.io/api/macros" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"title":"string"}' Retrieves a Macro resource.
Parameters
idstringpathrequired- Macro identifier
Responses
200Macro resource403Forbidden404Not found
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/macros/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Updates the Macro resource.
Parameters
idstringpathrequired- Macro identifier
Request body application/merge-patch+json
sharedboolean | null- Write-only switch: false makes it personal to the current agent (set by PersonalRuleProcessor).
actionsobject[]titlestringdescriptionstring | nullactivebooleanpositionintegerrestricted_groupsstring (iri-reference)[]
Responses
200Macro resource updated400Invalid input403Forbidden404Not found422An error occurred
Example request
curl -X PATCH "https://yourcompany.chaosdesk.io/api/macros/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/merge-patch+json" \
-d '{"shared":false,"actions":"string"}' Removes the Macro resource.
Parameters
idstringpathrequired- Macro identifier
Responses
204Macro resource deleted403Forbidden404Not found
Example request
curl -X DELETE "https://yourcompany.chaosdesk.io/api/macros/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json"