Users

Users: 5 operations of the ChaosDesk REST API.

The authenticated user, with effective permissions.

GET/api/me

Responses

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

GET/api/users

Parameters

pageintegerquery
The collection page number
itemsPerPageintegerquery
The number of items per page
rolestringquery
role[]string[]query
namestringquery
emailstringquery
memberships.organizationstringquery
memberships.organization[]string[]query
order[name]"asc" | "desc"query
order[created_at]"asc" | "desc"query
order[updated_at]"asc" | "desc"query
qstringquery
Search name, any email address or phone number.

Responses

  • 200User collection
  • 403Forbidden

Example request

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

Creates a User resource.

POST/api/users

Request body application/json

namestring
emailstring | 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[]
localestring
time_zonestring
notesstring | null
detailsstring | null
tagsstring[]
suspendedboolean

Responses

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

GET/api/users/{id}

Parameters

idstringpathrequired
User identifier

Responses

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

PATCH/api/users/{id}

Parameters

idstringpathrequired
User identifier

Request body application/merge-patch+json

namestring
emailstring | 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[]
localestring
time_zonestring
notesstring | null
detailsstring | null
tagsstring[]
suspendedboolean

Responses

  • 200User resource updated
  • 400Invalid input
  • 403Forbidden
  • 404Not found
  • 422An 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"}'