Create Ip Rule
POST /ip-rulesRequest body — IpRuleCreate
Section titled “Request body — IpRuleCreate”| Field | Type | Notes | |
|---|---|---|---|
cidr | string | required | min length 1 max length 64 |
action | allow | deny | required | — |
description | string | null | optional | max length 300 |
scope | workspace | organization | platform | optional | Default "workspace". |
Responses
Section titled “Responses”| Status | Description | Body |
|---|---|---|
201 | Successful Response | IpRuleView |
422 | Validation Error | HTTPValidationError |
Example
Section titled “Example”The body shows the fields the schema always carries. Which combination is legal is a service rule the schema cannot express, so read the description above before copying this.
curl -X POST https://your-deployment.example.com/ip-rules \ -H "Authorization: Bearer $COBRE_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "cidr": "string", "action": "allow" }'Response — IpRuleView
Section titled “Response — IpRuleView”| Field | Type | Notes | |
|---|---|---|---|
id | string (uuid) | required | — |
cidr | string | required | — |
action | allow | deny | required | — |
description | string | null | optional | — |
is_active | boolean | required | — |
scope | workspace | organization | platform | required | — |
organization_id | string (uuid) | null | optional | — |
workspace_id | string (uuid) | null | optional | — |
created_at | string (date-time) | required | — |