Manage Pull Zones and Accelerators via the API.
Get all zones for your account.
GET /api/v1/zones
| Parameter | Type | Description |
|---|---|---|
page |
integer | Page number (default: 1) |
per_page |
integer | Items per page (max: 100) |
type |
string | Filter by type: cdn or accelerator |
curl "https://nordiccdn.com/api/v1/zones?type=cdn" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"data": [
{
"uuid": "abc123",
"name": "My Zone",
"zone_type": "cdn",
"origin_url": "https://example.com",
"cdn_hostname": "abc123.cdn.nordiccdn.com",
"cache_ttl": 3600,
"created_at": "2024-01-15T10:30:00Z"
}
],
"meta": {
"current_page": 1,
"total": 5,
"per_page": 15
}
}
Get details for a specific zone.
GET /api/v1/zones/{uuid}
curl "https://nordiccdn.com/api/v1/zones/abc123" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"data": {
"uuid": "abc123",
"name": "My Zone",
"zone_type": "cdn",
"origin_url": "https://example.com",
"origin_host_header": null,
"cdn_hostname": "abc123.cdn.nordiccdn.com",
"cache_ttl": 3600,
"cache_query_strings": false,
"cors_enabled": true,
"hotlink_protection": false,
"image_optimization": true,
"minify_css": true,
"minify_js": true,
"scripts_enabled": false,
"waf_enabled": true,
"waiting_room_enabled": false,
"custom_domains": [
{
"domain": "cdn.example.com",
"ssl_status": "active"
}
],
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-20T14:45:00Z"
}
}
Create a new Pull Zone or Accelerator.
POST /api/v1/zones
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | No | Zone name |
zone_type |
string | No | cdn (default) or accelerator |
origin_url |
string | Yes | Origin server URL |
origin_host_header |
string | No | Host header for origin |
cache_ttl |
integer | No | Cache TTL in seconds |
cache_query_strings |
boolean | No | Include query strings in cache key |
| Parameter | Type | Description |
|---|---|---|
accelerator_preset |
string | wordpress, woocommerce, prestashop, custom |
accelerator_bypass_cookies |
array | Cookies that bypass cache |
esi_enabled |
boolean | Enable ESI processing |
curl -X POST "https://nordiccdn.com/api/v1/zones" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My Assets",
"origin_url": "https://example.com",
"cache_ttl": 86400,
"image_optimization": true
}'
curl -X POST "https://nordiccdn.com/api/v1/zones" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My WordPress Site",
"zone_type": "accelerator",
"origin_url": "https://mywordpress.com",
"accelerator_preset": "wordpress"
}'
{
"data": {
"uuid": "def456",
"name": "My Assets",
"cdn_hostname": "def456.cdn.nordiccdn.com",
"origin_url": "https://example.com",
"created_at": "2024-01-25T09:00:00Z"
}
}
Update an existing zone.
PUT /api/v1/zones/{uuid}
curl -X PUT "https://nordiccdn.com/api/v1/zones/abc123" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"cache_ttl": 7200,
"minify_css": true,
"minify_js": true
}'
{
"data": {
"uuid": "abc123",
"cache_ttl": 7200,
"minify_css": true,
"minify_js": true,
"updated_at": "2024-01-25T10:00:00Z"
}
}
Delete a zone permanently.
DELETE /api/v1/zones/{uuid}
curl -X DELETE "https://nordiccdn.com/api/v1/zones/abc123" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"message": "Zone deleted successfully."
}
{warning} This action cannot be undone. All cached content will be removed.
Get traffic and performance stats for a zone.
GET /api/v1/zones/{uuid}/stats
| Parameter | Type | Description |
|---|---|---|
period |
string | hour, day, week, month |
start_date |
string | Start date (YYYY-MM-DD) |
end_date |
string | End date (YYYY-MM-DD) |
curl "https://nordiccdn.com/api/v1/zones/abc123/stats?period=day" \
-H "Authorization: Bearer YOUR_API_TOKEN"
{
"data": {
"requests_total": 1250000,
"bandwidth_bytes": 5368709120,
"cache_hit_ratio": 0.94,
"requests_by_status": {
"2xx": 1200000,
"3xx": 25000,
"4xx": 20000,
"5xx": 5000
},
"bandwidth_by_day": [
{"date": "2024-01-24", "bytes": 2684354560},
{"date": "2024-01-25", "bytes": 2684354560}
]
}
}
POST /api/v1/zones/{uuid}/domains
curl -X POST "https://nordiccdn.com/api/v1/zones/abc123/domains" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain": "cdn.example.com"}'
DELETE /api/v1/zones/{uuid}/domains/{domain}
curl -X DELETE "https://nordiccdn.com/api/v1/zones/abc123/domains/cdn.example.com" \
-H "Authorization: Bearer YOUR_API_TOKEN"