Create and manage firewall groups for servers

Create new firewall groups and define rules for network traffic. It returns a unique ID for the firewall group that can be used in subsequent API calls to manage or reference the group.

Headers

Accept Example
Content-Type Example

Body

required
application/json
name string required
description string required
rules array required

Responses

200
success boolean
timestamp string
requestId string
data object
POST https://cloud.hostup.se/api/firewall-groups
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/firewall-groups" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "description": "string",
    "rules": [
      {
        "type": "string",
        "action": "string",
        "proto": "string",
        "enable": 0,
        "dport": "string",
        "comment": "string"
      }
    ]
  }'
Response
{
  "success": true,
  "timestamp": "string",
  "requestId": "string",
  "data": {
    "group": {
      "id": "string",
      "client_id": 0,
      "name": "string",
      "description": "string",
      "is_system": true,
      "created_at": "string",
      "updated_at": "string"
    },
    "message": "string"
  }
}
Request Body
{
  "name": "string",
  "description": "string",
  "rules": [
    {
      "type": "string",
      "action": "string",
      "proto": "string",
      "enable": 0,
      "dport": "string",
      "comment": "string"
    }
  ]
}