User fields
User fields: 5 operations of the ChaosDesk REST API.
- GET
/api/user_fieldsRetrieves the collection of UserField resources. - POST
/api/user_fieldsCreates a UserField resource. - GET
/api/user_fields/{id}Retrieves a UserField resource. - PATCH
/api/user_fields/{id}Updates the UserField resource. - DELETE
/api/user_fields/{id}Removes the UserField resource.
Retrieves the collection of UserField resources.
Responses
200UserField collection403Forbidden
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.
Request body application/json
keystring- Stable machine key used in rules, search, import and the API (
user_fields.{key}). titlestringrequiredtype"text" | "textarea" | "dropdown" | "multiselect" | "date" | "integer" | "decimal" | "checkbox" | "regex" | "credit_card" | "lookup" | "currency"descriptionstring | nullactivebooleanpositionintegerregex_patternstring | nulloptionsobject[]- options for dropdown/multiselect
Responses
201UserField resource created400Invalid input403Forbidden422An 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.
Parameters
idstringpathrequired- UserField identifier
Responses
200UserField resource403Forbidden404Not 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.
Parameters
idstringpathrequired- UserField identifier
Request body application/merge-patch+json
titlestringdescriptionstring | nullactivebooleanpositionintegerregex_patternstring | nulloptionsobject[]- options for dropdown/multiselect
Responses
200UserField resource updated400Invalid input403Forbidden404Not found422An 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.
Parameters
idstringpathrequired- UserField identifier
Responses
204UserField resource deleted403Forbidden404Not found
Example request
curl -X DELETE "https://yourcompany.chaosdesk.io/api/user_fields/{id}" \
-H "Authorization: Bearer $CHAOSDESK_TOKEN" \
-H "Accept: application/json"