API reference
Firewalls
GET
header
AuthorizationBearer <token>label_selector?stringFilter by labels: env=prod, env!=prod, env (has key), !env; comma = AND
Firewalls
application/json- response
firewalls*array<>curl -X GET "https://example.com/firewalls"{ "firewalls": [ { "id": 0, "name": "string", "rules": [ { "direction": "in", "protocol": "tcp", "port": "string", "source_ips": [ "string" ], "destination_ips": [ "string" ], "description": "string" } ], "applied_to": [ { "type": "server", "server": 0, "label_selector": "string", "applied_to_servers": [ 0 ] } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z" } ]}POST
header
AuthorizationBearer <token>application/json- body
name*stringLength
1 <= length <= 64rules?array<>apply_to?array<>labels?Up to 64 key/value pairs; keys and values up to 63 characters
Created
application/json- response
firewall*action?|nullcurl -X POST "https://example.com/firewalls" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "firewall": { "id": 0, "name": "string", "rules": [ { "direction": "in", "protocol": "tcp", "port": "string", "source_ips": [ "string" ], "destination_ips": [ "string" ], "description": "string" } ], "applied_to": [ { "type": "server", "server": 0, "label_selector": "string", "applied_to_servers": [ 0 ] } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z" }, "action": { "id": 0, "command": "create_server", "status": "running", "progress": 0, "started": "2019-08-24T14:15:22Z", "finished": "2019-08-24T14:15:22Z", "resources": [ { "id": 0, "type": "server" } ], "error": { "code": "string", "message": "string" } }}GET
header
AuthorizationBearer <token>id*integerFormat
int64Firewall
application/json- response
firewall*curl -X GET "https://example.com/firewalls/0"{ "firewall": { "id": 0, "name": "string", "rules": [ { "direction": "in", "protocol": "tcp", "port": "string", "source_ips": [ "string" ], "destination_ips": [ "string" ], "description": "string" } ], "applied_to": [ { "type": "server", "server": 0, "label_selector": "string", "applied_to_servers": [ 0 ] } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z" }}DELETE
header
AuthorizationBearer <token>id*integerFormat
int64Deleted
curl -X DELETE "https://example.com/firewalls/0"Empty
PUT
header
AuthorizationBearer <token>id*integerFormat
int64application/json- body
name?stringLength
1 <= length <= 64labels?Up to 64 key/value pairs; keys and values up to 63 characters
Updated
application/json- response
firewall*curl -X PUT "https://example.com/firewalls/0" \ -H "Content-Type: application/json" \ -d '{}'{ "firewall": { "id": 0, "name": "string", "rules": [ { "direction": "in", "protocol": "tcp", "port": "string", "source_ips": [ "string" ], "destination_ips": [ "string" ], "description": "string" } ], "applied_to": [ { "type": "server", "server": 0, "label_selector": "string", "applied_to_servers": [ 0 ] } ], "labels": { "property1": "string", "property2": "string" }, "created": "2019-08-24T14:15:22Z" }}POST
header
AuthorizationBearer <token>id*integerFormat
int64application/json- body
rules*array<>Action started
application/json- response
action*curl -X POST "https://example.com/firewalls/0/actions/set_rules" \ -H "Content-Type: application/json" \ -d '{ "rules": [ { "direction": "in", "protocol": "tcp" } ] }'{ "action": { "id": 0, "command": "create_server", "status": "running", "progress": 0, "started": "2019-08-24T14:15:22Z", "finished": "2019-08-24T14:15:22Z", "resources": [ { "id": 0, "type": "server" } ], "error": { "code": "string", "message": "string" } }}POST
header
AuthorizationBearer <token>id*integerFormat
int64application/json- body
apply_to*array<>Action started
application/json- response
action*curl -X POST "https://example.com/firewalls/0/actions/apply_to_resources" \ -H "Content-Type: application/json" \ -d '{ "apply_to": [ { "type": "server" } ] }'{ "action": { "id": 0, "command": "create_server", "status": "running", "progress": 0, "started": "2019-08-24T14:15:22Z", "finished": "2019-08-24T14:15:22Z", "resources": [ { "id": 0, "type": "server" } ], "error": { "code": "string", "message": "string" } }}POST
header
AuthorizationBearer <token>id*integerFormat
int64application/json- body
remove_from*array<>Action started
application/json- response
action*curl -X POST "https://example.com/firewalls/0/actions/remove_from_resources" \ -H "Content-Type: application/json" \ -d '{ "remove_from": [ { "type": "server" } ] }'{ "action": { "id": 0, "command": "create_server", "status": "running", "progress": 0, "started": "2019-08-24T14:15:22Z", "finished": "2019-08-24T14:15:22Z", "resources": [ { "id": 0, "type": "server" } ], "error": { "code": "string", "message": "string" } }}