Networking
Create security group
Create a new security group with a set of inbound/outbound rules.
Optionally seed from a template (template_id from GET /api/v1/security-groups/templates) — its rules are copied as the starting set, then merged with any explicit rules you pass.
post/api/v1/security-groups
Headers
X-Project-IDstring uuid required
Project ID. Required for all mutating operations (create, delete, power actions, resize).
Request body
Example request
{
"name": "web-server",
"template_id": "web-server",
"rules": [
{
"range": "80",
"ip": "0.0.0.0"
}
]
}Response
Security group created
Example response
{
"data": {
"name": "web-server",
"rules": [
{
"range": "80",
"ip": "0.0.0.0"
}
]
}
}