Skip to main content
POST
/
distributions
/
{distributionID}
/
access-rules
Create New Access
curl --request POST \
  --url https://api.tenbyte.io/v1/cdn/distributions/{distributionID}/access-rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "block country",
  "match_type": "regex",
  "match_pattern": "/(login|offer)",
  "config": {
    "ip_access": {
      "enabled": true,
      "values": [
        "113.11.48.0/20"
      ],
      "action": "deny"
    }
  },
  "referrer_access": {
    "action": "",
    "enabled": true
  }
}
'
{}

Authorizations

Authorization
string
header
required

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

Path Parameters

distributionID
string
required

Body

application/json
name
string
required
match_type
string
required
match_pattern
string
required
config
object
required

Response

200 - application/json

The response is of type object.