Create User Group
Creates a new user group.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
POST /api/sonar/user-groups
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-d name="Cyber Security" \
-X POST \
https://HOSTNAME/api/sonar/user-groups
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| name | O | String | User group name | Minimum 1 to maximum 200 characters |
| guid | X | String | User group GUID | 36 characters |
| company_guid | X | String | Company GUID | 36 characters. Option only available for a cluster administrator |
| description | X | String | Description | Maximum 2,000 characters |
| user_guids | X | Array | User identifier group | Invalid user identifier is ignored. |
Success Response
{}
Error Responses
Required argument is missing
{
"error_code": "null-argument",
"error_msg": "name should be not null"
}
Invalid argument length
{
"error_code": "invalid-argument",
"error_msg": "'name' must be shorter than or equal to 200 characters."
}
User identifier is not in valid GUID format
{
"error_code": "invalid-param-type",
"error_msg": "user_guids should be guid type."
}