Skip to main content
POST
Create filtering rule

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-API-Version
string
required

Management API version.

Body

application/json
name
string
required

Name of the filtering rule

Example:

"Block suspicious IPs"

environment
string
required

Environment ID

Example:

"ae_rrETjdWcfqI6AFsk"

expression
string
required

Expression in expr-lang format that defines the rule condition

Example:

"http.request.ip in cidr('192.168.1.1/32')"

action
enum<string>
required

Action to take when the rule matches

Available options:
allow,
deny
Example:

"deny"

status
enum<string>
default:enabled

Status of the filtering rule

Available options:
enabled,
disabled
deny_with
enum<string>

Error message to return when denying a request

Available options:
Forbidden
Example:

"Forbidden"

placement
object

Placement options for the rule

Response

Created filtering rule object.

data
object
required