Firewalls

Manage firewalls and their attached network policies.

Firewalls object

Attributes

object

String

id

String

slug

String

name

String

description

StringNullable

status

Enum

network_id

String

network_policies

Object

created_at

Date

updated_at

Date

archived_at

DateNullable
{
"object": "network.firewall",
"status": "active",
"network_policies": [
{
"object": "network.policy#preview",
"rules": [
{
"object": "network.policy.rule",
"effect": "allow",
"direction": "ingress",
"ports": [
{
"object": "network.policy.port_range"
},
{
"object": "network.policy.port_range"
}
]
},
{
"object": "network.policy.rule",
"effect": "allow",
"direction": "ingress",
"ports": [
{
"object": "network.policy.port_range"
},
{
"object": "network.policy.port_range"
}
]
}
]
},
{
"object": "network.policy#preview",
"rules": [
{
"object": "network.policy.rule",
"effect": "allow",
"direction": "ingress",
"ports": [
{
"object": "network.policy.port_range"
},
{
"object": "network.policy.port_range"
}
]
},
{
"object": "network.policy.rule",
"effect": "allow",
"direction": "ingress",
"ports": [
{
"object": "network.policy.port_range"
},
{
"object": "network.policy.port_range"
}
]
}
]
}
]
}

List firewalls

Returns a paginated list of firewalls.

Query Parameters

limit

NumberOptional

after

StringOptional

before

StringOptional

cursor

StringOptional

order

EnumOptional

id

UnionOptional

slug

UnionOptional

status

UnionOptional

network_id

UnionOptional

enclave_id

UnionOptional

provider_id

UnionOptional

network_policy_id

UnionOptional

created_at

ObjectOptional

Filter firewall creation time by date range

updated_at

ObjectOptional

Filter firewall last update time by date range

GEThttp://api.metorial.com/firewalls
curl -X GET "https://api.metorial.com/firewalls" \
-H "Authorization: Bearer metorial_sk_..."

Get firewall

Retrieves a specific firewall by ID.

URL Parameters

firewall_id

String

The unique identifier for the firewall

GEThttp://api.metorial.com/firewalls/:firewall_id
curl -X GET "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Create firewall

Creates a new firewall.

Request Body

name

String

description

StringOptional

slug

StringOptional

network_id

String

bindings

ObjectOptional

network_policy_ids

Array of StringsOptional
POSThttp://api.metorial.com/firewalls
curl -X POST "https://api.metorial.com/firewalls" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"slug": "example_slug",
"network_id": "example_network_id",
"bindings": {
"target_type": "enclave",
"enclave_id": "example_enclave_id",
"provider_id": "example_provider_id",
"network_id": "example_network_id"
},
"network_policy_ids": [
"example_item"
]
}'

Update firewall

Updates a firewall definition.

URL Parameters

firewall_id

String

The unique identifier for the firewall

Request Body

name

StringOptional

description

StringOptional

slug

StringOptional

network_policy_ids

Array of StringsOptional
PATCHhttp://api.metorial.com/firewalls/:firewall_id
curl -X PATCH "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"name": "example_name",
"description": "example_description",
"slug": "example_slug",
"network_policy_ids": [
"example_item"
]
}'

Delete firewall

Archives a firewall.

URL Parameters

firewall_id

String

The unique identifier for the firewall

DELETEhttp://api.metorial.com/firewalls/:firewall_id
curl -X DELETE "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."

Attach network policy

Attaches a network policy to a firewall.

URL Parameters

firewall_id

String

The unique identifier for the firewall

Request Body

network_policy_id

String

position

NumberOptional
POSThttp://api.metorial.com/firewalls/:firewall_id/network-policies
curl -X POST "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY/network-policies" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer metorial_sk_..." \
-d '{
"network_policy_id": "example_network_policy_id",
"position": 0
}'

Detach network policy

Detaches a network policy from a firewall.

URL Parameters

firewall_id

String

The unique identifier for the firewall

network_policy_id

String

The unique identifier for the network_policy

DELETEhttp://api.metorial.com/firewalls/:firewall_id/network-policies/:network_policy_id
curl -X DELETE "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY/network-policies/net_Rm4Mnheq2bfEPhBhP7SY" \
-H "Authorization: Bearer metorial_sk_..."