API
Network

Network

Base path: /api/cloud/network (all protected)

GET /api/cloud/network/security_groups/list

  • Auth: Bearer (Keycloak)
  • Description: Lists security groups.
  • Example:
curl -H "Authorization: Bearer $TOKEN" \
  https://your-host/api/cloud/network/security_groups/list

POST /api/cloud/network/security_groups/create

  • Auth: Bearer (Keycloak)
  • Body (JSON):
    • SecurityGroupName (string, required)
    • SecurityGroupDescription (string, optional)
  • Responses: 201 Created with group object; 401/500
  • Example:
curl -X POST https://your-host/api/cloud/network/security_groups/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"SecurityGroupName":"web","SecurityGroupDescription":"web sg"}'

PUT /api/cloud/network/security_groups/update/:id

  • Auth: Bearer (Keycloak)
  • Params:
    • id (string, security group ID)
  • Body (JSON):
    • SecurityGroupName (string, optional)
    • SecurityGroupDescription (string, optional)
  • Responses: 200 OK with updated group; 400/401/500
  • Example:
curl -X PUT https://your-host/api/cloud/network/security_groups/update/SG_ID \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"SecurityGroupName":"web-upd"}'

DELETE /api/cloud/network/security_groups/delete/:id

  • Auth: Bearer (Keycloak)
  • Params:
    • id (string, security group ID)
  • Responses: 200 OK with message; 401/500
  • Example:
curl -X DELETE https://your-host/api/cloud/network/security_groups/delete/SG_ID \
  -H "Authorization: Bearer $TOKEN"

POST /api/cloud/network/create

  • Auth: Bearer (Keycloak)
  • Description: Adds/creates a private network for the project.
  • Body (JSON):
    • requestedCIDR (string, optional, e.g., 10.42.0.0/24)
  • Responses: 200 OK with result; 400/401 on validation; 500 on failures
  • Example:
curl -X POST https://your-host/api/cloud/network/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{"requestedCIDR":"10.42.0.0/24"}'

GET /api/cloud/network/security_groups/rules/list

  • Auth: Bearer (Keycloak)
  • Description: Lists security group rules.
  • Example:
curl -H "Authorization: Bearer $TOKEN" \
  https://your-host/api/cloud/network/security_groups/rules/list

DELETE /api/cloud/network/security_groups/rules/delete/:id

  • Auth: Bearer (Keycloak)
  • Params:
    • id (string, rule ID)
  • Example:
curl -X DELETE https://your-host/api/cloud/network/security_groups/rules/delete/RULE_ID \
  -H "Authorization: Bearer $TOKEN"

POST /api/cloud/network/security_groups/rules/create

  • Auth: Bearer (Keycloak)
  • Body (JSON):
    • security_group_rule (object, required; OpenStack rule shape)
  • Responses: 201 Created with workflow handle; 401/500
  • Example:
curl -X POST https://your-host/api/cloud/network/security_groups/rules/create \
  -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
  -d '{
    "security_group_rule": {
      "direction": "ingress",
      "protocol": "tcp",
      "port_range_min": 22,
      "port_range_max": 22,
      "remote_ip_prefix": "0.0.0.0/0",
      "security_group_id": "SG_ID"
    }
  }'

GET /api/cloud/network/private_networks

  • Auth: Bearer (Keycloak)
  • Description: Lists private networks for the project.
  • Example:
curl -H "Authorization: Bearer $TOKEN" \
  https://your-host/api/cloud/network/private_networks