Create Subnet

Create a new subnet for a specified subnet group.

HTTP Request

POST /api/sonar/subnet-groups/:guid/subnets
Request using cURL
curl -H "Authorization: Bearer <API_KEY>" \
     -d start_ip="" \
     -d end_ip="" \
     -X POST \
Request Parameters
guidOStringSubnet group GUID36 characters
start_ipOStringStarting IP addressMinumum 7 to maximum 15 characters
end_ipXStringEnding IP addressMinumum 7 to maximum 15 characters
cidrX32-bit integerCIDRMinimum 0 to maximum 32
descriptionXStringSubnet descriptionMaximum 255 characters
At least one of `end_ip` and `cidr` must be provided.

Success Response


Error Responses

Required argument is missing

HTTP status code 400.

    "error_code": "null-argument",
    "error_msg": "start_ip should be not null"
Invalid argument length

HTTP status code 400.

    "error_code": "invalid-argument",
    "error_msg": "'start_ip' must be less than or equal to 15 characters."
cidr is not an integer

HTTP status code 400.

    "error_code": "invalid-argument",
    "error_msg": "'cidr' parameter should be int type"
No privilege to create a subnet

HTTP status code 500 .

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