Roles
Roles: 5 operations of the ChaosDesk REST API.
- GET
/api/rolesRetrieves the collection of Role resources. - POST
/api/rolesCreates a Role resource. - GET
/api/roles/{id}Retrieves a Role resource. - PATCH
/api/roles/{id}Updates the Role resource. - DELETE
/api/roles/{id}Removes the Role resource.
Retrieves the collection of Role resources.
Parameters
pageintegerquery- The collection page number
itemsPerPageintegerquery- The number of items per page
Responses
200Role collection403Forbidden
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/roles" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Creates a Role resource.
Request body application/json
namestringrequireddescriptionstring | nullticket_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 created400Invalid input403Forbidden422An 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.
Parameters
idstringpathrequired- Role identifier
Responses
200Role resource403Forbidden404Not 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.
Parameters
idstringpathrequired- Role identifier
Request body application/merge-patch+json
namestringdescriptionstring | nullticket_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 updated400Invalid input403Forbidden404Not found422An 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.
Parameters
idstringpathrequired- Role identifier
Responses
204Role resource deleted403Forbidden404Not found
Example request
curl -X DELETE "https://yourcompany.chaosdesk.io/api/roles/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json"