Skip to main content
POST
Create a traffic rule

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

organization
string
required

Organization name slug from list_organizations. Example: acme.

database
string
required

Database name slug from list_databases. Example: app-db.

branch
string
required

Branch name from list_branches. Example: main.

budget_id
string
required

The ID of the traffic budget

Body

application/json
kind
enum<string>

Kind of rule

Available options:
match,
each
keyspace
string

The keyspace to apply a query pattern rule to

fingerprint
string

Query pattern fingerprint to apply rule to

tags
string[]

Optional array of tags for this rule. Each rules take exactly one tag.

Response

Returns the created traffic rule

id
string
required

The ID of the traffic rule

kind
enum<string>
required

The kind of rule

Available options:
match,
each
tags
object[]
required
actor
object
required
syntax_highlighted_sql
string
required

Syntax highlighted SQL for rules with SQL keys

created_at
string
required

When the rule was created

updated_at
string
required

When the rule was updated

fingerprint
string | null

The query fingerprint targeted by this rule

keyspace
string | null

The keyspace of the fingerprint