Update User Group

Updates a specified user group.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

PUT /api/sonar/user-groups/:guid
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d name="Cyber Security" \
     -d user_guids=ffaf431b-653a-4329-8f83-913cbb00342d \
     -X PUT \
     https://HOSTNAME/api/sonar/user-groups/a2a42968-787f-45a3-bec9-b6b68db21c2f
Request Parameters
Path Parameters
KeyTypeDescriptionNote
guidStringUser group GUID36 characters
Request Body Parameters
KeyRequiredTypeDescriptionNote
nameYesStringUser group nameMinimum 1 to maximum 200 characters
descriptionNoStringDescriptionMaximum 2,000 characters
user_guidsNoArrayList of user GUIDsInvalid user GUID is ignored

Success Response

{}

Error Responses

name parameter is missing

HTTP status code 400

{
  "error_code": "null-argument",
  "error_msg": "name should be not null"
}
name or description parameter length is invalid

HTTP status code 400

{
  "error_code": "invalid-argument",
  "error_msg": "'name' must be shorter than or equal to 200 characters."
}
guid is not a valid GUID

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "guid should be guid type."
}
user_guids is not in valid GUID format

HTTP status code 400

{
  "error_code": "invalid-param-type",
  "error_msg": "user_guids should be guid type."
}
User group is not found

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "user group not found: a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
name is duplicated

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "duplicated user group name: Cyber Security"
}
Permission denied

HTTP status code 500

{
  "error_code": "illegal-state",
  "error_msg": "no-permission"
}