Roles

Roles: 5 operations of the ChaosDesk REST API.

Retrieves the collection of Role resources.

GET/api/roles

Parameters

pageintegerquery
The collection page number
itemsPerPageintegerquery
The number of items per page

Responses

  • 200Role collection
  • 403Forbidden

Example request

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

Creates a Role resource.

POST/api/roles

Request body application/json

namestringrequired
descriptionstring | null
ticket_access"all" | "groups" | "assigned"
permissionsstring[]
configurationobject | null
Raw Zendesk custom_role.configuration (imported, seeded or saved by the role editor). It is the source of truth for ticket access and permissions whenever it is set; null for roles that only have a permission list (the API then derives one, see getConfiguration()).

Responses

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

Example request

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

Retrieves a Role resource.

GET/api/roles/{id}

Parameters

idstringpathrequired
Role identifier

Responses

  • 200Role resource
  • 403Forbidden
  • 404Not found

Example request

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

Updates the Role resource.

PATCH/api/roles/{id}

Parameters

idstringpathrequired
Role identifier

Request body application/merge-patch+json

namestring
descriptionstring | null
ticket_access"all" | "groups" | "assigned"
permissionsstring[]
configurationobject | null
Raw Zendesk custom_role.configuration (imported, seeded or saved by the role editor). It is the source of truth for ticket access and permissions whenever it is set; null for roles that only have a permission list (the API then derives one, see getConfiguration()).

Responses

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

Example request

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

Removes the Role resource.

DELETE/api/roles/{id}

Parameters

idstringpathrequired
Role identifier

Responses

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

Example request

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