Remove Subnets
Deletes the specified subnets.
Required Permissions
Requires the ADMIN role or higher.
HTTP Request
DELETE /api/sonar/subnet-groups/:guid/subnets
cURL Example
curl -H "Authorization: Bearer <API_KEY>" \
-X DELETE \
"https://HOSTNAME/api/sonar/subnet-groups/638cfeb2-e259-46af-961a-1eeb65ea35f0/subnets?ids=10"
Request Parameters
| Key | Required | Type | Description | Note |
|---|---|---|---|---|
| guid | O | String | Subnet group GUID | 36 characters |
| ids | O | List (of 32-bit integers) | Subnet ID list | Comma-separated list |
Success Response
{
"failures": []
}
Error Responses
Subnet group Identifier is not in valid GUID format
HTTP status code 400
{
"error_code": "invalid-param-type",
"error_msg": "guid should be guid type."
}
Subnet identifier list is not a 32-bit integer list
HTTP status code 400
{
"error_code": "invalid-argument",
"error_msg": "'ids' parameter should be int_list type"
}
Subnet is not found
HTTP status code 200
{
"failures": [
{
"id": "6",
"reason": "subnet-not-found"
}
]
}
No privileges to delete a subnet
HTTP status code 500 .
{
"error_code": "illegal-state",
"error_msg": "no-permission"
}