Firewalls
Manage firewalls and their attached network policies.
Firewalls object
Attributes
object
Stringid
Stringslug
Stringname
Stringdescription
StringNullablestatus
Enumnetwork_id
Stringnetwork_policies
Objectcreated_at
Dateupdated_at
Datearchived_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
NumberOptionalafter
StringOptionalbefore
StringOptionalcursor
StringOptionalorder
EnumOptionalid
UnionOptionalslug
UnionOptionalstatus
UnionOptionalnetwork_id
UnionOptionalenclave_id
UnionOptionalprovider_id
UnionOptionalnetwork_policy_id
UnionOptionalcreated_at
ObjectOptionalFilter firewall creation time by date range
updated_at
ObjectOptionalFilter firewall last update time by date range
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
StringThe unique identifier for the firewall
curl -X GET "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."
Create firewall
Creates a new firewall.
Request Body
name
Stringdescription
StringOptionalslug
StringOptionalnetwork_id
Stringbindings
ObjectOptionalnetwork_policy_ids
Array of StringsOptionalcurl -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
StringThe unique identifier for the firewall
Request Body
name
StringOptionaldescription
StringOptionalslug
StringOptionalnetwork_policy_ids
Array of StringsOptionalcurl -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
StringThe unique identifier for the firewall
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
StringThe unique identifier for the firewall
Request Body
network_policy_id
Stringposition
NumberOptionalcurl -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
StringThe unique identifier for the firewall
network_policy_id
StringThe unique identifier for the network_policy
curl -X DELETE "https://api.metorial.com/firewalls/fir_Rm4Mnheq2bfEPhBhP7SY/network-policies/net_Rm4Mnheq2bfEPhBhP7SY" \-H "Authorization: Bearer metorial_sk_..."