Skip to main content
PATCH
/
filtering-rules
Mutate filtering rules
curl --request PATCH \
  --url https://management-api.fpjs.io/filtering-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-API-Version: <x-api-version>' \
  --data '
{
  "environment": "<string>",
  "permission": "allow",
  "op": "add",
  "items": [
    "<string>"
  ]
}
'
{
  "data": [
    {
      "type": "origin",
      "environment": "ae_rrETjdWcfqI6AFsk",
      "allow": [
        "example.com",
        "my-website.com"
      ],
      "deny": [
        "*"
      ]
    }
  ]
}

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
environment
string
required

ID of an environment for which we are mutating the filtering rules.

permission
enum<string>
required

Permission list we want to mutate, either allow or deny.

Available options:
allow,
deny
op
enum<string>
required

Operation we are executing on specified permission list, either add or remove.

Available options:
add,
remove
items
string[]
required

List of items we are mutating with the given operation on the given permission list.

Response

data
object[]
required