Contents
Statistics
Bandwidth and HTTP error codes of your resources.
Literal response from the frozen contract
- GETBandwidth of every resource
/api/v1/stats/bandwidth - GETBandwidth of a resource
/api/v1/stats/{resource}/bandwidth - GETHTTP error codes of every resource
/api/v1/errors/{period}/{interval} - GETHTTP error codes of a resource
/api/v1/errors/{period}/{interval}/{resource}
GET
/api/v1/stats/bandwidthBandwidth of every resource
Returns the bandwidth of every resource of the user between two dates.
- Authentication
- HTTP Basic with the user API key
- Host
- https://api.cdnify.lat, https://reseller.cdnify.lat
- In CDNify
- Same behaviour as before
- API v2 equivalent
- Traffic report GET /api/v2/analytics/traffic
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| datefrom | Query | string | No |
|
| dateto | Query | string | No |
|
Responses
200OKapplication/json
Fields (15)
Responses v1GetUserBandwidth 200 Field Type Required Rules datefrom string Yes dateto string Yes hits integer Yes total_bandwidth number Yes overall_usage array<object> Yes overall_usage[].#1 object No overall_usage[].#1.resource string Yes overall_usage[].#1.cached number Yes overall_usage[].#1.non_cached number Yes overall_usage[].#1.hits integer Yes overall_usage[].#2 object No overall_usage[].#2.timestamp string Yes overall_usage[].#2.cached number Yes overall_usage[].#2.non_cached number Yes overall_usage[].#2.hits integer Yes Example { "datefrom": "2026-01-08", "dateto": "2026-01-15", "hits": 42, "total_bandwidth": 3145728, "overall_usage": [ { "resource": "a1b2c3d", "cached": 1048576, "non_cached": 2097152, "hits": 42 } ] }400Bad requestapplication/json
Fields (3)
Responses v1GetUserBandwidth 400 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example: datefrom { "errors": [ { "code": 400, "message": "HTTP: datefrom should be in the format YYYY-MM-DD" } ] }Example: dateto { "errors": [ { "code": 400, "message": "HTTP: dateto should be in the format YYYY-MM-DD" } ] }Example: range { "errors": [ { "code": 400, "message": "HTTP: 'datefrom' time must be less than 'dateto' time" } ] }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
curl 'https://api.cdnify.lat/api/v1/stats/bandwidth' \
-u "$CDNIFY_API_KEY:x"GET
/api/v1/stats/{resource}/bandwidthBandwidth of a resource
Returns the bandwidth of one resource between two dates.
- 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
- Traffic report GET /api/v2/analytics/traffic
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| resource | Path | string | Yes |
|
| datefrom | Query | string | No |
|
| dateto | Query | string | No |
|
Responses
200OKapplication/json
Headers: X-RateLimit-Limit: 1000, X-RateLimit-Remaining: 999, X-RateLimit-Reset: 1768474800
Fields (20)
Responses v1GetResourceBandwidth 200 Field Type Required Rules resource string Yes datefrom string Yes dateto string Yes origin string Yes overall_usage array<array> Yes - At least 1 items
- At most 1 items
overall_usage[][].timestamp string Yes overall_usage[][].cached number Yes overall_usage[][].non_cached number Yes overall_usage[][].hits integer Yes pop_usage array<object> Yes - At least 1 items
- At most 1 items
pop_usage[].#1 oneOf No pop_usage[].#1.#1 object No pop_usage[].#1.#1.* object No pop_usage[].#1.#1.*.name string Yes pop_usage[].#1.#1.*.hits integer Yes pop_usage[].#1.#1.*.bytes number Yes pop_usage[].#1.#2 array No - At most 0 items
pop_usage[].#2 any No - Can be null
hit_usage array<integer> Yes - At least 1 items
- At most 1 items
bandwidth_usage array<number> Yes - At least 1 items
- At most 1 items
Example { "resource": "a1b2c3d", "datefrom": "2026-01-08", "dateto": "2026-01-15", "origin": "www.example.com", "overall_usage": [ [ { "timestamp": "2026-01-15 00:00:00", "cached": 1048576, "non_cached": 2097152, "hits": 42 } ] ], "pop_usage": [ { "Amsterdam": { "name": "Amsterdam", "hits": 42, "bytes": 3145728 } } ], "hit_usage": [ 42 ], "bandwidth_usage": [ 3145728 ] }400Bad requestapplication/json
Fields (3)
Responses v1GetResourceBandwidth 400 Field Type Required Rules errors array<object> Yes - At least 1 items
errors[].code integer Yes errors[].message string Yes Example: datefrom { "errors": [ { "code": 400, "message": "HTTP: datefrom should be in the format YYYY-MM-DD" } ] }Example: dateto { "errors": [ { "code": 400, "message": "HTTP: dateto should be in the format YYYY-MM-DD" } ] }Example: range { "errors": [ { "code": 400, "message": "HTTP: 'datefrom' time must be less than 'dateto' time" } ] }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1GetResourceBandwidth 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/stats/a1b2c3d/bandwidth' \
-u "$CDNIFY_API_KEY:x"GET
/api/v1/errors/{period}/{interval}HTTP error codes of every resource
Returns the HTTP error codes served for every resource of the user, by period and interval.
- 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
- API v2 equivalent
- Traffic report GET /api/v2/analytics/traffic
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| period | Path | string | Yes |
|
| interval | Path | string | Yes |
|
Responses
200OKapplication/json
Fields (8)
Responses v1GetUserErrorCodes 200 Field Type Required Rules timestamp string Yes results array<object> Yes results[].resource string Yes results[].stats array<object> Yes results[].stats[].uri string Yes results[].stats[].codes array<object> Yes results[].stats[].codes[].code integer Yes results[].stats[].codes[].count integer Yes Example { "timestamp": "2026-01-15T10:00:00+0000", "results": [ { "resource": "a1b2c3d", "stats": [ { "uri": "/img/missing.png", "codes": [ { "code": 404, "count": 9 } ] } ] } ] }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1GetUserErrorCodes 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: No route found for \"GET /api/v1/errors/week/2\"" } ] }500Internal server errortext/html
curl 'https://api.cdnify.lat/api/v1/errors/minute/10' \
-u "$CDNIFY_API_KEY:x"GET
/api/v1/errors/{period}/{interval}/{resource}HTTP error codes of a resource
Returns the HTTP error codes served for one resource, by period and interval.
- 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
- API v2 equivalent
- Traffic report GET /api/v2/analytics/traffic
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| period | Path | string | Yes |
|
| interval | Path | string | Yes |
|
| resource | Path | string | Yes |
|
Responses
200OKapplication/json
Fields (8)
Responses v1GetResourceErrorCodes 200 Field Type Required Rules timestamp string Yes results array<object> Yes results[].resource string Yes results[].stats array<object> Yes results[].stats[].uri string Yes results[].stats[].codes array<object> Yes results[].stats[].codes[].code integer Yes results[].stats[].codes[].count integer Yes Example { "timestamp": "2026-01-15T10:00:00+0000", "results": [ { "resource": "a1b2c3d", "stats": [ { "uri": "/img/missing.png", "codes": [ { "code": 404, "count": 9 } ] } ] } ] }401Unauthorized
Headers: WWW-Authenticate: Basic realm="Secured Area"
404Not foundapplication/json
Fields (3)
Responses v1GetResourceErrorCodes 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" } ] }500Internal server errortext/html
curl 'https://api.cdnify.lat/api/v1/errors/minute/10/a1b2c3d' \
-u "$CDNIFY_API_KEY:x"