Users
Users: 5 operations of the ChaosDesk REST API.
- GET
/api/meThe authenticated user, with effective permissions. - GET
/api/usersRetrieves the collection of User resources. - POST
/api/usersCreates a User resource. - GET
/api/users/{id}Retrieves a User resource. - PATCH
/api/users/{id}Updates the User resource.
The authenticated user, with effective permissions.
Responses
200User resource403Forbidden404Not found
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/me" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Retrieves the collection of User resources.
Parameters
pageintegerquery- The collection page number
itemsPerPageintegerquery- The number of items per page
rolestringqueryrole[]string[]querynamestringqueryemailstringquerymemberships.organizationstringquerymemberships.organization[]string[]queryorder[name]"asc" | "desc"queryorder[created_at]"asc" | "desc"queryorder[updated_at]"asc" | "desc"queryqstringquery- Search name, any email address or phone number.
Responses
200User collection403Forbidden
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/users" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Creates a User resource.
Request body application/json
namestringemailstring | null (email)role"end_user" | "agent" | "admin"custom_role_idstring | null (uuid)additional_emailsstring[]phonesstring[]organization_idsstring[]remove_organization_idsstring[]remove_identity_idsstring[]- identity ids (emails/phones) to remove; the primary email cannot be removed
group_idsstring[]localestringtime_zonestringnotesstring | nulldetailsstring | nulltagsstring[]suspendedboolean
Responses
201User resource created400Invalid input403Forbidden422An error occurred
Example request
curl -X POST "https://yourcompany.chaosdesk.io/api/users" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"name":"string","email":"string"}' Retrieves a User resource.
Parameters
idstringpathrequired- User identifier
Responses
200User resource403Forbidden404Not found
Example request
curl -X GET "https://yourcompany.chaosdesk.io/api/users/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" Updates the User resource.
Parameters
idstringpathrequired- User identifier
Request body application/merge-patch+json
namestringemailstring | null (email)role"end_user" | "agent" | "admin"custom_role_idstring | null (uuid)additional_emailsstring[]phonesstring[]organization_idsstring[]remove_organization_idsstring[]remove_identity_idsstring[]- identity ids (emails/phones) to remove; the primary email cannot be removed
group_idsstring[]localestringtime_zonestringnotesstring | nulldetailsstring | nulltagsstring[]suspendedboolean
Responses
200User resource updated400Invalid input403Forbidden404Not found422An error occurred
Example request
curl -X PATCH "https://yourcompany.chaosdesk.io/api/users/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/merge-patch+json" \
-d '{"name":"string","email":"string"}'