Contents
Cache
Purges and cache statistics of a resource.
Literal response from the frozen contract
- GETPopular files
/api/v1/resources/{resource}/cache - DELETEPurge the cache
/api/v1/resources/{resource}/cache - GETCache statistics
/api/v1/resources/{resource}/cache/{period} - POSTPurge from the web form
/api/v1/resources/{resource}/purge-cache-stats
/api/v1/resources/{resource}/cachePopular files
Returns up to 20 of the most requested files of the resource in the last 24 hours.
- Authentication
- HTTP Basic with the user API key
- Host
- https://api.cdnify.lat, https://reseller.cdnify.lat
- In CDNify
- Same behaviour as before
- Rate limited
- Yes
- API v2 equivalent
- Most requested paths GET /api/v2/analytics/top-paths
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| resource | Path | string | Yes |
|
Responses
200OKapplication/json
Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800
Fields (4)
Responses v1GetPopularFiles 200 Field Type Required Rules files array<object> Yes - At most 20 items
files[].uri string Yes files[].hits integer Yes files[].bytes integer Yes Example { "files": [ { "uri": "/img/logo.png", "hits": 40, "bytes": 2048000 } ] }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1GetPopularFiles 404 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example { "errors": [ { "code": 404, "message": "HTTP: Failed to find resource" } ] }429Too many requeststext/plain
Example You have reached the rate limit
curl 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/cache' \
-u "$CDNIFY_API_KEY:x"/api/v1/resources/{resource}/cachePurge the cache
Purges the whole cache of the resource, or only the URIs listed in files. The answer does not wait for the purge to finish.
Send JSON with Content-Type exactly application/json, or a form: a JSON body that is not read means that the whole cache is purged.
- Authentication
- HTTP Basic with the user API key
- Host
- https://api.cdnify.lat, https://reseller.cdnify.lat
- In CDNify
- Same behaviour as before
- Rate limited
- Yes
- API v2 equivalent
- Purge cached content POST /api/v2/sites/{site_id}/purge-requests
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| resource | Path | string | Yes |
|
Request body
Content types: application/x-www-form-urlencoded, application/json
| Field | Type | Required | Rules |
|---|---|---|---|
| files | array<string> | No |
{
"files": [
"/css/site.css",
"/img/logo.png"
]
}Responses
204No content
Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800
401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1PurgeCache 404 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example { "errors": [ { "code": 404, "message": "HTTP: Failed to find resource" } ] }429Too many requeststext/plain
Example You have reached the rate limit500Internal server errortext/html
curl -X DELETE 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/cache' \
-u "$CDNIFY_API_KEY:x" \
--data-urlencode 'files[]=/css/site.css' \
--data-urlencode 'files[]=/img/logo.png'/api/v1/resources/{resource}/cache/{period}Cache statistics
Returns the bandwidth and the popular files of the resource for a period, or between custom dates.
- Authentication
- HTTP Basic with the user API key
- Host
- https://api.cdnify.lat, https://reseller.cdnify.lat
- In CDNify
- Same contract, with a defect corrected
- Rate limited
- Yes
- API v2 equivalent
- Traffic report GET /api/v2/analytics/traffic
- Most requested paths GET /api/v2/analytics/top-paths
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| resource | Path | string | Yes |
|
| period | Path | string | Yes |
|
| custom_date_from | Query | string | No | |
| custom_date_to | Query | string | No |
Responses
200OKapplication/json
Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800
Fields (24)
Responses v1GetCacheStats 200 Field Type Required Rules stats object Yes stats.data array<object> Yes stats.data[].timestamp string Yes stats.data[].cached number Yes stats.data[].non_cached number Yes stats.data[].hits integer Yes stats.pops oneOf Yes stats.pops.#1 object No stats.pops.#1.* object No stats.pops.#1.*.name string Yes stats.pops.#1.*.hits integer Yes stats.pops.#1.*.bytes number Yes stats.pops.#2 array No - At most 0 items
stats.hits integer Yes stats.bandwidth number Yes files array<object> Yes - At most 20 items
files[].uri string Yes files[].hits integer Yes files[].bytes integer Yes resource object Yes resource.id string Yes resource.hostname string Yes resource.alias string Yes resource.cache_expiry integer Yes Example { "stats": { "data": [ { "timestamp": "2026-01-15 00:00:00", "cached": 1048576, "non_cached": 2097152, "hits": 42 } ], "pops": { "Amsterdam": { "name": "Amsterdam", "hits": 42, "bytes": 3145728 } }, "hits": 42, "bandwidth": 3145728 }, "files": [ { "uri": "/img/logo.png", "hits": 40, "bytes": 2048000 } ], "resource": { "id": "a1b2c3d", "hostname": "example.a.cdnify.io", "alias": "example", "cache_expiry": 0 } }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1GetCacheStats 404 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example { "errors": [ { "code": 404, "message": "HTTP: Failed to find resource" } ] }429Too many requeststext/plain
Example You have reached the rate limit500Internal server errortext/html
curl 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/cache/day' \
-u "$CDNIFY_API_KEY:x"/api/v1/resources/{resource}/purge-cache-statsPurge from the web form
Purge action of the previous web panel, declared under the API. It answers with a redirect; integrations should use the cache purge route.
- Authentication
- HTTP Basic with the user API key
- Host
- https://api.cdnify.lat, https://reseller.cdnify.lat
- In CDNify
- Same contract, with a defect corrected
- Rate limited
- Yes
- API v2 equivalent
- Purge cached content POST /api/v2/sites/{site_id}/purge-requests
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| resource | Path | string | Yes |
|
Request body
Content types: application/x-www-form-urlencoded
| Field | Type | Required | Rules |
|---|---|---|---|
| files | string | No |
{
"files": "/css/site.css\n/img/logo.png"
}Responses
302Found (redirect)
Headers: Location: /resource/a1b2c3d/cache
401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1PurgeCacheFromForm 404 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example { "errors": [ { "code": 404, "message": "HTTP: Failed to find resource" } ] }429Too many requeststext/plain
Example You have reached the rate limit
curl -X POST 'https://api.cdnify.lat/api/v1/resources/a1b2c3d/purge-cache-stats' \
-u "$CDNIFY_API_KEY:x" \
--data-urlencode 'files=/css/site.css
/img/logo.png'