Skip to main content
POST
Add a firewall rule

Authorizations

Authorization
string
header
required

Use a Runcrate API key with the rc_live_* prefix as the bearer token. Create one at https://www.runcrate.ai/dashboard/api-keys.

Path Parameters

id
string
required

Environment ID, or current for the environment the request acts in

Body

application/json
protocol
enum<string>
required
Available options:
tcp,
udp
port_from
integer
required
Required range: 1 <= x <= 65535
sources
string[]
required

IP addresses and CIDR ranges, IPv4 or IPv6, or anywhere. Stored normalised: a single address becomes /32 or /128; anywhere is ["0.0.0.0/0", "::/0"].

Required array length: 1 - 20 elements
port_to
integer

End of a range; defaults to port_from.

Required range: 1 <= x <= 65535
description
string | null
Maximum string length: 100

Response

Rule created.

data
object
required