Create Subnet Group

Creates a new subnet group.

Required Permissions

Requires the ADMIN role or higher.

HTTP Request

POST /api/sonar/subnet-groups
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
     -d name="OA" \
     -d description="Office zone" \
     -X POST \
     https://HOSTNAME/api/sonar/subnet-groups
Request Parameters
KeyRequiredTypeDescriptionNote
guidXStringSubnet group GUID36 characters. Randomly generated if not specified.
nameOStringSubnet group nameMinimum 1 to maximum 50 characters
descriptionXStringSubnet descriptionMaximum 2000 characters

Success Response

{
  "guid": "b76c3c81-c961-404f-a0eb-fae2f12f5bd8"
}
  • guid (String): GUID of the created subnet group

Error Responses

Required argument is missing

HTTP status code 400

{
    "error_code": "null-argument",
    "error_msg": "name should be not null"
}
Invalid argument length

HTTP status code 400

{
    "error_code": "invalid-argument",
    "error_msg": "'name' must be shorter than or equal to 50 characters."
}
Duplicate group name

HTTP status code 500

{
    "error_code": "illegal-state",
    "error_msg": "duplicated subnet group name: OA"
}
No privilege to create a subnet group

HTTP status code 500

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