Cache totals with per-node breakdown
const url = 'https://api.nsin.ir/domains/example.com/cache/keys/summary';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.nsin.ir/domains/example.com/cache/keys/summary \ --header 'Authorization: Bearer <token>'Entry count and byte size for the whole domain, broken down by the edge
node that cached each entry. It takes no filters — it always covers
the whole domain. Computed at most once a minute per domain (a purge
refreshes it at once). Requires domain.view.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The domain name (for example example.com) — not a numeric id.
Example
example.comResponses
Section titled “ Responses ”Totals.
object
object
Example generated
{ "entries": 1, "size_bytes": 1, "by_node": [ { "node": "example", "entries": 1, "size_bytes": 1 } ]}Missing, malformed, revoked or expired API key. (A valid key whose
account has been deactivated gets 403 account is inactive instead.)
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "invalid API key"}No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}The key exceeded its request budget (300 requests per minute by default).
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Examples
{ "error": "rate limit exceeded"}The cache registry is temporarily unreachable.
The single error shape used by every endpoint.
object
Human-readable description of what went wrong.
Example
{ "error": "read-only API key"}