Delivery Analytics
GET/api/v1/analytics/cdn/:report
Reports on how your assets are delivered through the FileSpin CDN. Each report groups the account's CDN requests a different way; add asset_id to any of them to see one asset only. The asset page's Delivery tab in the dashboard uses the same data.
Who can call it: an Admin or Manager of the account, with the Delivery Insights add-on (included on the free trial and on Growth, Scale and Enterprise; not on Pay as you go). Without the add-on the call returns 403 with "error": "plan_upgrade_required".
What is counted: requests served by the FileSpin CDN (cdn.filespin.io and on-demand image URLs on it), a few minutes after they happen. The dashboard's own thumbnails and previews are not counted; a CDN link opened from the dashboard is, with dashboard.filespin.io as the site. Files downloaded and hosted somewhere else are not seen. Accounts that deliver through a dedicated CDN resource are not included.
Reports
report | Groups requests by | Report-specific parameters |
|---|---|---|
popular-assets | Asset, most requested first | metric (requests or bytes) |
audience | One audience dimension | dimension: referrer, country, device, browser, os, asn or hour_of_day |
timeseries | Time bucket | interval (hour or day) |
asset-transforms | Delivered size or transformation (needs asset_id) | group_by: spec, resize, crop, format_delivered or quality_bucket |
cache-performance | Nothing: totals, CDN cache hit rate and time to first byte | |
campaigns | Campaign tag on the URL | |
channels | Channel tag on the URL |
Sites that embed an asset: call audience with dimension=referrer and asset_id. Each row is the host name of the site the request came from (www.example.com), not the full page. An empty value means no referrer was sent: the link was opened directly, or the app or browser withheld it. Referrers are kept for 30 days.
Campaign and channel tags come from campaign links made in the dashboard or by the AI Agent; requests without a tag are reported as (untagged).
Example: the sites embedding one asset
curl "https://app.filespin.io/api/v1/analytics/cdn/audience?dimension=referrer&asset_id=99d819953914402babbdeb68337ea6a3&from=2026-11-01T00:00:00Z" \
-H "X-FileSpin-Api-Key: YOUR_API_KEY"
{
"dimension": "referrer",
"data": [
{ "dimension": "www.example.com", "requests": 1840, "bytes": 412339200 },
{ "dimension": "shop.example.com", "requests": 310, "bytes": 61022080 },
{ "dimension": "", "requests": 95, "bytes": 18011136 }
],
"data_as_of": "2026-11-24T09:41:12Z"
}
Responses
Every response has data_as_of: the time of the newest request included. Rows have requests and bytes; the grouping key depends on the report:
report | Row keys |
|---|---|
popular-assets | asset_id, requests, bytes |
audience | dimension (the value: host name, country code, device …), requests, bytes |
timeseries | ts (bucket start, UTC), requests, bytes |
asset-transforms | transform_spec_normalised (for example resize=800,800; empty = the file as stored), requests, bytes, last_seen. The response also has asset_id |
cache-performance | No rows: requests, cache_hits, cache_hit_rate (0 to 1) and ttfb_ms (p50, p90, p99) |
campaigns | campaign_key, campaign_name, distinct_assets, requests, bytes, first_seen, last_seen |
channels | channel, requests, bytes, share (fraction of all requests) |
Request
Responses
- 200
- 401
- 403
- 404
- 502
The report
Unauthorized - Invalid or missing authentication
Not an Admin or Manager, or the account has no Delivery Insights add-on ("error": "plan_upgrade_required")
Unknown report
The analytics service is unavailable; try again shortly