VOD PullUpdate or Delete Rule

Update or Delete Rule

Update — omit _METHOD or do not send it; the full rule options object is sent as the body and the rule is updated in place. Delete — include "_METHOD": "DELETE" as the only body field. The rule identified by ruleId is permanently removed.

curl -X POST "https://api.5centscdn.com/v2/zones/vod/pull/12345/rules/rule/201" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
  "name": "Cache Segments",
  "rule": "/stream/*",
  "options": {
    "edge_cache_settings": {
      "enabled": null,
      "control": "default",
      "default": "345600s",
      "value": "345600s",
      "revalidate": null,
      "custom": {
        "default": "",
        "value": ""
      },
      "custom_values": {
        "codes": [],
        "value": []
      }
    },
    "cors": {
      "enabled": null,
      "control": "*",
      "always": false,
      "value": "*",
      "custom": ""
    }
  }
}'
{
  "result": "success",
  "message": "Zone EdgeRule Updated. Please wait till the rules validation & deployment completes."
}
POST
/zones/vod/pull/{zoneId}/rules/rule/{ruleId}
POST
Base URLstring

Target server for requests. Edit to use your own host.

API Key (header: X-API-Key)
X-API-Keystring
Required

API key (sent in header)

path
zoneIdinteger
Required

Numeric ID of the zone

path
ruleIdinteger
Required

Numeric ID of the edge rule to update or delete

Content-Typestring
Required

The media type of the request body

Options: application/json
namestring
Required

Pre-populated rule name. Send back as received from GET rules.

rulestring
Required

Pre-populated rule pattern. Send back as received from GET rules.

optionsobject
Required

Full options object for the rule update.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
X-API-Keystring
Required

API Key for authentication. Provide your API key in the header.

Path Parameters

zoneIdinteger
Required

Numeric ID of the zone

Example:
12345
ruleIdinteger
Required

Numeric ID of the edge rule to update or delete

Example:
201

Body

application/json
namestring
Required

Pre-populated rule name. Send back as received from GET rules.

Example:
Cache Segments
rulestring
Required

Pre-populated rule pattern. Send back as received from GET rules.

Example:
/stream/*
optionsobject
Required

Full options object for the rule update.

Responses

resultstring
Required

Status of the API response.

Allowed values:success
messagestring
Required