Macros

Macros: 5 operations of the ChaosDesk REST API.

Retrieves the collection of Macro resources.

GET/api/macros

Responses

  • 200Macro collection
  • 403Forbidden

Example request

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

Creates a Macro resource.

POST/api/macros

Request body application/json

sharedboolean | null
Write-only switch: false makes it personal to the current agent (set by PersonalRuleProcessor).
actionsobject[]
titlestringrequired
descriptionstring | null
activeboolean
positioninteger
restricted_groupsstring (iri-reference)[]

Responses

  • 201Macro resource created
  • 400Invalid input
  • 403Forbidden
  • 422An 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.

GET/api/macros/{id}

Parameters

idstringpathrequired
Macro identifier

Responses

  • 200Macro resource
  • 403Forbidden
  • 404Not 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.

PATCH/api/macros/{id}

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[]
titlestring
descriptionstring | null
activeboolean
positioninteger
restricted_groupsstring (iri-reference)[]

Responses

  • 200Macro resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An 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.

DELETE/api/macros/{id}

Parameters

idstringpathrequired
Macro identifier

Responses

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

Example request

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