Skip to content

Get a firewall policy

GET/v1/firewall-policies/{uid}

Returns one firewall policy with its rules and the resources it is attached to.

Authentication

Send your API key as Authorization: Bearer <token>. The request is scoped to the workspace in X-Workspace-Slug.

Path parameters

uidstringRequired

The firewall policy's uid.

Headers

X-Workspace-SlugstringRequired

Slug of the workspace the request acts on. You can also pass it as the workspace_slug query parameter.

Response

200

The firewall policy.

successbooleanRequired

true when the request succeeded.

messagestringRequired

Human-readable status message.

dataobject
Show attributes
uidstringRequired

Unique identifier of the policy.

namestringRequired

Name of the policy, unique in the workspace.

slugstringRequired

URL-friendly form of the name.

descriptionstring

Free-text description. Omitted when empty.

is_defaultbooleanRequired

Whether the policy is labelled as a workspace default. It is not applied automatically.

rulesarray of objects

The policy's rules, oldest first. Omitted when the policy has no rules.

Show item attributes
operation_idstringRequired

On Add a firewall rule and Update a firewall rule, the UID of the first firewall.apply operation queued for the change. An empty string when no operation was queued, and always empty when rules are returned inside a policy.

uidstringRequired

Unique identifier of the rule.

directionstringRequired

Traffic direction the rule applies to.

One ofinboundoutbound

actionstringRequired

What happens to matching traffic. Always allow.

One ofallow

protocolstringRequired

IP protocol the rule matches.

One oftcpudpall

port_startintegerRequired

First port of the range. 0 with port_end 0 means all ports.

port_endintegerRequired

Last port of the range.

cidrstringRequired

Source address range in CIDR notation.

descriptionstring

Note about the rule. Omitted when empty.

is_defaultbooleanRequired

true for the SSH and app-port rules added automatically when the policy was created.

attached_resourcesarray of objects

Resources the policy is attached to, newest first. Omitted when there are none.

Show item attributes
operation_idstringRequired

On Attach a firewall policy, the UID of the firewall.apply operation queued for the resource. An empty string when the policy was already attached or no operation could be queued, and always empty when attachments are returned inside a policy.

uidstringRequired

Unique identifier of the attachment. Use it to detach the policy.

resource_typestringRequired

Kind of resource the policy is attached to.

One ofvmdatabasedeployment

resourceobjectRequired

Short description of the attached resource. All fields are empty strings if the resource no longer exists.

Show attributes
uidstringRequired

UID of the VM, database or deployment.

namestringRequired

Name of the resource.

slugstringRequired

Slug of the resource.

statusstringRequired

Current status of the resource. For VMs and databases this is the display status.

created_atstring (date-time)Required

When the policy was created (RFC 3339).

updated_atstring (date-time)Required

When the policy itself was last changed. Rule changes do not update it.

Errors

StatusMeaning
401The API key is missing, invalid, expired or revoked.
403You cannot access the workspace, your role does not allow this action, or the account is suspended.
404No firewall policy with this uid exists in the workspace.

Errors use the standard error format.