Returns a JSON object containing the current configuration settings of the CDN zone.
Endpoint
https://www.pushrcdn.com/api/v3/zones/get
Methods
POST
Parameters
Parameter | Type | Description |
zone_id | integer | The ID of the CDN zone |
Headers
Field | Type | Description |
APIKEY | string | Your account API key |
Example
curl -d "zone_id=12542" \
-H "Accept: application/json" \
-H "APIKEY: c45ed960ac1c3d12c1d570a869df8c79c473003cbjk" \
-X POST "https://www.pushrcdn.com/api/v3/zones/get"
Response
The zone JSON object contains all settings of the CDN zone
{
"zone":[
{
"zone_id":"12542",
"zone_name":"my zone",
"zone_pull":"1",
"zone_storage":"50",
"zone_active":"0",
"zone_limitconn":"0",
"zone_limitrate":"0",
"zone_ipblock":"0",
"zone_hotlink_referer":"0",
"zone_hotlink_tokens":"0",
"zone_cors":"0",
"zone_gzip":"0",
"zone_ignore_headers":"0",
"zone_ignore_ranges":"0",
"zone_ignore_strings":"1",
"zone_cache_revalidate":"1",
"zone_data_cap":"0",
"zone_cache_expiration":"10",
"zone_cache_ttl":"10",
"zone_blocked_countries":null
}
]
}
Parameter | Type | Values | Description |
zone_pull | integer | 0, 1 | 1 if zone is of pull type. 0 if push. |
zone_storage | integer | 0 - ∞ | SFS storage usage (push zones only) in bytes. |
zone_active | integer | 0, 1 | 1 if zone is active. 0 if deactivated. |
zone_limitconn | integer | 0, 1 | 1 if connections per IP limit is set. |
zone_limitrate | integer | 0, 1 | 1 if speed per connection limit is set. |
zone_ipblock | integer | 0, 1 | 1 if blocking by IP address is set. |
zone_hotlink_referer | integer | 0, 1 | 1 if domain lock is set. |
zone_hotlink_tokens | integer | 0, 1 | 1 if secure tokens are enabled. |
zone_cors | integer | 0, 1 | 1 if CORS are set. |
zone_gzip | integer | 0, 1 | 1 if Gzip compression is enabled. |
zone_ignore_headers | integer | 0, 1 | 1 if origin's cache-control headers should be ignored. |
zone_ignore_ranges | integer | 0, 1 | 1 if "Large files and video" optimization is enabled. |
zone_ignore_strings | integer | 0, 1 | 1 if query strings in URLs should be ignored. |
zone_cache_revalidate | integer | 0, 1 | 1 if cache revalidation (RFC) is enabled. |
zone_data_cap | integer | 0, 1 | 1 if data cap is enabled. |
zone_cache_expiration | integer | 1 - 10 | Edge cache expiration. See below. |
zone_cache_ttl | integer | 1 - 10 | Browser cache expiration. See below. |
zone_blocked_countries | string | ISO3166 code, NULL | Country code(s) of blocked countries. NULL if disabled. |
The zone_cache_expiration and zone_cache_ttl parameters contain values between 1 and 10. They corrspond to different cache expiration times as follows:
Value | Description |
1 | 1 second |
2 | 30 seconds |
3 | 1 minute |
4 | 5 minutes |
5 | 1 hour |
6 | 12 hours |
7 | 1 day |
8 | 15 days |
9 | 30 days |
10 | Maximum |