User fields

User fields: 5 operations of the ChaosDesk REST API.

Retrieves the collection of UserField resources.

GET/api/user_fields

Responses

  • 200UserField collection
  • 403Forbidden

Example request

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

Creates a UserField resource.

POST/api/user_fields

Request body application/json

keystring
Stable machine key used in rules, search, import and the API (user_fields.{key}).
titlestringrequired
type"text" | "textarea" | "dropdown" | "multiselect" | "date" | "integer" | "decimal" | "checkbox" | "regex" | "credit_card" | "lookup" | "currency"
descriptionstring | null
activeboolean
positioninteger
regex_patternstring | null
optionsobject[]
options for dropdown/multiselect

Responses

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

Example request

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

Retrieves a UserField resource.

GET/api/user_fields/{id}

Parameters

idstringpathrequired
UserField identifier

Responses

  • 200UserField resource
  • 403Forbidden
  • 404Not found

Example request

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

Updates the UserField resource.

PATCH/api/user_fields/{id}

Parameters

idstringpathrequired
UserField identifier

Request body application/merge-patch+json

titlestring
descriptionstring | null
activeboolean
positioninteger
regex_patternstring | null
optionsobject[]
options for dropdown/multiselect

Responses

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

Example request

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

Removes the UserField resource.

DELETE/api/user_fields/{id}

Parameters

idstringpathrequired
UserField identifier

Responses

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

Example request

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