List Rules
Returns all configured edge rules for the given zone, together with the zone's default-behavior entries. The response rules array is used to populate the Edge Rules summary table; behaviors contains the single default-behavior object.
curl -X GET "https://api.5centscdn.com/v2/zones/vod/pull/12345/rules" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY"
import requests
import json
url = "https://api.5centscdn.com/v2/zones/vod/pull/12345/rules"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.5centscdn.com/v2/zones/vod/pull/12345/rules", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.5centscdn.com/v2/zones/vod/pull/12345/rules", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.5centscdn.com/v2/zones/vod/pull/12345/rules')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"result": "success",
"rules": [
{
"id": 12345,
"network": "sample-network",
"rule": {
"name": "sample-edge-rule",
"rule": "/images/*",
"ruleType": 0,
"originProtocol": null,
"isRegex": true,
"network": "sample-network",
"options": {
"ignore_cookie": {
"enabled": false,
"value": false
},
"honor_vary": {
"enabled": false,
"value": false
},
"xff": {
"enabled": false,
"value": false
},
"disposition": {
"enabled": false,
"value": 0
},
"redirect_http_to_https": {
"enabled": false,
"value": false
},
"segmenter_cache_settings": {
"enabled": false,
"midgress_manifest": 2,
"edge_manifest": 4,
"midgress_segment": 1,
"edge_segment": 3
},
"follow_origin_redirect": {
"enabled": false,
"codes": []
},
"host_redirect": {
"enabled": false,
"value": null,
"to": null
},
"gzipOn": {
"enabled": false,
"value": false
},
"fetch_compressed": {
"enabled": false,
"value": false
},
"slice": {
"enabled": false,
"value": false
},
"websockets": {
"enabled": false,
"value": false
},
"waf": {
"enabled": false,
"value": false
},
"stale": {
"enabled": false,
"value": []
},
"brotli_compression": {
"enabled": false,
"value": []
},
"response_headers_hiding_policy": {
"enabled": false,
"mode": "hide",
"expected": [
"connection",
"server",
"content-type",
"content-length",
"date"
],
"value": []
},
"referrer_acl": {
"enabled": false,
"policy_type": "allow",
"excepted_values": [],
"ip_whitelists": [],
"noreferer": false
},
"country_acl": {
"enabled": false,
"policy_type": "allow",
"excepted_values": [],
"ip_whitelists": []
},
"ip_address_acl": {
"enabled": false,
"policy_type": "allow",
"excepted_values": [],
"ip_whitelists": []
},
"user_agent_acl": {
"enabled": false,
"policy_type": "allow",
"excepted_values": [],
"ip_whitelists": [],
"casesensitive": false
},
"secure_key": {
"enabled": false,
"policy_type": "0",
"type": 2,
"key": "",
"ip_whitelists": [],
"timeout": 3600,
"session": 0
},
"allowedHttpMethods": {
"enabled": false,
"value": []
},
"tls_versions": {
"enabled": false,
"value": []
},
"edge_cache_settings": {
"enabled": false,
"revalidate": false,
"default": "345600s"
},
"midgress_cache_settings": {
"enabled": false,
"revalidate": false,
"default": "345600s"
},
"browser_cache_settings": {
"enabled": false
},
"cors": {
"enabled": false,
"always": false,
"value": ""
},
"sni": {
"enabled": false
},
"force_return": {
"enabled": false
},
"rewrite": {
"enabled": false
},
"staticRequestHeaders": {
"enabled": false
},
"staticHeaders": {
"enabled": false
},
"hostHeader": null,
"forward_host_header": null,
"limit_bandwidth": {
"enabled": false,
"limit_type": "dynamic"
},
"limit_request": {
"enabled": false,
"rate": 0,
"burst": 0,
"delay": 0,
"ip_whitelists": []
},
"hsts": {
"enabled": false,
"referrerPolicy": "no-referrer",
"includeSubDomains": false,
"preload": false
},
"cms": {
"enabled": false,
"value": []
},
"image_stack": null,
"asset_stack": null,
"ignoreQueryString": {
"enabled": false,
"value": false
},
"query_params_blacklist": {
"enabled": false,
"value": false
},
"query_params_whitelist": {
"enabled": false,
"value": false
}
}
}
}
],
"behaviors": [
{
"id": 12346,
"network": "sample-network",
"rule": {
"name": "default",
"rule": "/",
"ruleType": 0,
"overrideOriginProtocol": "",
"options": {
"allowedHttpMethods": null,
"bot_protection": null,
"brotli_compression": null,
"browser_cache_settings": {
"enabled": true,
"value": "86400s"
},
"cache_http_headers": null,
"cors": {
"enabled": true,
"always": true,
"value": [
"*"
]
},
"country_acl": null,
"disable_cache": null,
"disable_proxy_force_ranges": null,
"edge_cache_settings": {
"enabled": true,
"value": "7776000s",
"custom_values": {},
"revalidate": true
},
"fetch_compressed": null,
"follow_origin_redirect": null,
"force_return": null,
"forward_host_header": null,
"gzipOn": null,
"hostHeader": null,
"http3_enabled": null,
"ignoreQueryString": {
"enabled": true,
"value": true
},
"ignore_cookie": null,
"ip_address_acl": null,
"limit_bandwidth": null,
"proxy_cache_methods_set": null,
"query_params_blacklist": null,
"query_params_whitelist": null,
"redirect_http_to_https": null,
"redirect_https_to_http": null,
"referrer_acl": null,
"response_headers_hiding_policy": null,
"request_limiter": null,
"rewrite": null,
"secure_key": null,
"slice": {
"enabled": true,
"value": true
},
"sni": null,
"stale": null,
"staticHeaders": null,
"staticRequestHeaders": null,
"static_response_headers": null,
"tls_versions": null,
"use_default_le_chain": null,
"use_dns01_le_challenge": null,
"use_rsa_le_cert": null,
"user_agent_acl": null,
"image_stack": null,
"websockets": null,
"asset_stack": null,
"midgress_cache_settings": {
"enabled": true,
"value": "7776000s",
"custom_values": {},
"revalidate": true
}
}
}
}
]
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
/zones/vod/pull/{zoneId}/rulesTarget server for requests. Edit to use your own host.
API key (sent in header)
Numeric ID of the zone
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Provide your API key in the header.
Path Parameters
Responses
Status of the API response.
successList of edge rules configured for this zone.
Unique identifier of this edge rule or default behavior.
CDN network provider associated with this rule or behavior.
Rule configuration object containing the match pattern and behavior options.
Human-readable label for the edge rule.
URL pattern or glob applied to incoming requests.
Rule type identifier. 0 = standard path-based rule.
Origin protocol override. Null to inherit from zone settings.
When true, the rule pattern uses regular expression syntax.
CDN network provider associated with this rule configuration.
Behavior options applied when this rule matches a request.
Ignore Set-Cookie headers from origin so responses can be cached.
Respect the Vary header from origin when forming cache keys.
Forward the client IP in the X-Forwarded-For header to origin.
Control the Content-Disposition header mode for responses.
Automatically redirect HTTP requests to HTTPS.
Override cache durations for HLS manifest and segment files.
Follow 3xx redirects from origin instead of passing them to clients.
Redirect requests matching this rule to a different host.
Enable gzip compression for responses.
Fetch and serve pre-compressed assets from origin.
Enable range-request slice caching for large files.
Enable WebSocket proxying for matched requests.
Enable Web Application Firewall protection.
Serve stale cached content when specified error conditions occur.
Enable Brotli compression for specified MIME content types.
Filter or suppress specific response headers before delivery.
Allow or block requests based on the HTTP Referer header.
Allow or block requests based on the visitor country.
Allow or block requests based on the client IP address.
Allow or block requests based on the User-Agent header.
Protect content using time-limited signed URL tokens.
Restrict which HTTP methods are accepted for requests.
Restrict TLS connections to specific protocol versions.
Controls how long CDN edge nodes cache content.
Controls how long CDN mid-tier nodes cache content.
Controls Cache-Control headers sent to the client browser.
Set Cross-Origin Resource Sharing headers on responses.
Enable Server Name Indication for TLS connections.
Return a fixed HTTP status code and optional body for matched requests.
Rewrite the request URL path using a pattern and replacement.
Add static headers to requests forwarded to origin.
Add static headers to responses sent to clients.
Override the Host header sent to origin.
Forward the original client Host header to origin.
Throttle the response bandwidth for matched requests.
Rate-limit requests from each client IP address.
Set HTTP Strict Transport Security policy headers.
Apply caching optimizations for specific CMS platforms.
Enable on-the-fly image optimization.
Enable web performance optimizations for CSS and JavaScript assets.
Control how query strings are handled when forming cache keys.
Exclude specific query parameters from the cache key.
Include only specific query parameters in the cache key.
List of default behavior entries for this zone. Typically contains a single default behavior.
Unique identifier of this edge rule or default behavior.
CDN network provider associated with this rule or behavior.
Rule configuration object containing the match pattern and behavior options.
Human-readable label for the edge rule.
URL pattern or glob applied to incoming requests.
Rule type identifier. 0 = standard path-based rule.
Behavior options applied when this rule matches a request.
Restrict which HTTP methods are accepted for requests.
Enable Brotli compression for specified MIME content types.
Controls Cache-Control headers sent to the client browser.
Set Cross-Origin Resource Sharing headers on responses.
Allow or block requests based on the visitor country.
Controls how long CDN edge nodes cache content.
Fetch and serve pre-compressed assets from origin.
Follow 3xx redirects from origin instead of passing them to clients.
Return a fixed HTTP status code and optional body for matched requests.
Forward the original client Host header to origin.
Enable gzip compression for responses.
Override the Host header sent to origin.
Control how query strings are handled when forming cache keys.
Ignore Set-Cookie headers from origin so responses can be cached.
Allow or block requests based on the client IP address.
Throttle the response bandwidth for matched requests.
Exclude specific query parameters from the cache key.
Include only specific query parameters in the cache key.
Automatically redirect HTTP requests to HTTPS.
Allow or block requests based on the HTTP Referer header.
Filter or suppress specific response headers before delivery.
Rewrite the request URL path using a pattern and replacement.
Protect content using time-limited signed URL tokens.
Enable range-request slice caching for large files.
Enable Server Name Indication for TLS connections.
Serve stale cached content when specified error conditions occur.
Add static headers to responses sent to clients.
Add static headers to requests forwarded to origin.
Restrict TLS connections to specific protocol versions.
Allow or block requests based on the User-Agent header.
Enable on-the-fly image optimization.
Enable WebSocket proxying for matched requests.
Enable web performance optimizations for CSS and JavaScript assets.
Controls how long CDN mid-tier nodes cache content.
errorerror