nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Cache

Cache totals with per-node breakdown

gethttps://api.nsin.ir/domains/{domain}/cache/keys/summary

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

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.

Path parameters

  • domainstringrequiredpath

    The domain name (for example example.com) — not a numeric id.

Responses

200Totals.

Content type: application/json

  • entriesinteger
  • size_bytesinteger
  • by_nodearray of CacheNodeTotal
    Item fields
    • nodestring
    • entriesinteger
    • size_bytesinteger
json
{
  "entries": 0,
  "size_bytes": 0,
  "by_node": [
    {
      "node": "string",
      "entries": 0,
      "size_bytes": 0
    }
  ]
}
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
404No such domain, or it is not visible to this account. Domains you cannot access are reported as not found rather than forbidden.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}
503The cache registry is temporarily unreachable.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}

Example request

bash
curl -X GET "https://api.nsin.ir/domains/example.com/cache/keys/summary" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc