Ana içeriğe geç

Create IP Group

Endpoint

POST /apiops/projects/{projectName}/ipGroups/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name

Request Body

Full JSON Body Example - Basic IP Group

{
"name": "AllowedIPs",
"description": "Allowed IP addresses for API access"
}

Full JSON Body Example - IP Group without Description

{
"name": "BlockedIPs"
}

Request Body Fields

FieldTypeRequiredDefaultDescription
namestringYes-IP Group name (unique identifier within project)
descriptionstringNo-IP Group description
ipListarray[string]No[]Optional initial IP addresses or CIDR ranges. Omit or leave empty to create an empty group

Notes

  • name must be unique within the project
  • name must not be empty
  • When ipList is omitted or empty, the group is created with no IPs
  • Use Add IPs to Group to add addresses after creation

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"deploymentResult": {
"success": true,
"responseTime": 1500,
"detailList": [
{
"envName": "production",
"success": true,
"detail": "Deployed successfully",
"responseTime": 450
}
]
}
}

Error Response (400 Bad Request)

{
"status": "FAILURE",
"resultMessage": "name value can not be empty!"
}

or

{
"status": "FAILURE",
"resultMessage": "An IP Group with same name (AllowedIPs) already exists in project!"
}

Common Causes

  • Missing or empty name field
  • IP Group name already exists in project

cURL Example

curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/ipGroups/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "AllowedIPs",
"description": "Allowed IP addresses for API access"
}'

Notes and Warnings

  • Name Uniqueness:

    • IP Group name must be unique within the project
    • If name already exists, creation will fail
  • Optional ipList on create:

    • You can provide ipList in the create body to seed the group
    • When omitted, the group starts empty (pilot collection uses this pattern)
  • Empty Group:

  • Automatic Deployment:

    • The group is deployed to Gateway environments after create

Permissions

  • User must have GLOBAL_SETTINGS + MANAGE permission in the project