Skip to main content
PUT
/
distributions
/
{distributionID}
/
access-rules
/
{accessRuleId}
Update
curl --request PUT \
  --url https://api.tenbyte.io/v1/cdn/distributions/{distributionID}/access-rules/{accessRuleId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "update",
  "match_type": "prefix",
  "match_pattern": "/media/api/*",
  "config": {
    "country_access": {
      "enabled": true,
      "values": [
        "AR",
        "AF",
        "IN"
      ],
      "action": "allow"
    },
    "ip_access": {
      "enabled": true,
      "values": [
        "203.0.113.0/24",
        "198.51.100.0/24"
      ],
      "action": "deny"
    },
    "referrer_access": {
      "enabled": true,
      "values": [
        "mark.com",
        "example.com"
      ],
      "action": "allow"
    }
  }
}
'
{}

Authorizations

Authorization
string
header
required

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

Path Parameters

distributionID
string
required
accessRuleId
string
required

Body

application/json

The body is of type object.

Response

200 - application/json

The response is of type object.