Skip to content

Cached entry count and size for a domain

GET
/cache/stats/
curl --request GET \
--url 'https://api.nsin.ir/cache/stats/?domain=example.com' \
--header 'Authorization: Bearer <token>'

The domain’s live cache footprint, summed across every storage node. Results are cached briefly, so a purge can take a few seconds to show up here. Returns zeroes when the cache layer is not enabled.

domain
required
string

The domain name (for example example.com). These endpoints take the domain as a query parameter rather than a path segment.

Example
example.com

Cache footprint.

Media type application/json
object
entries
integer
size_bytes
integer
Example generated
{
"entries": 1,
"size_bytes": 1
}

The domain query parameter is missing.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example missing
{
"error": "domain is required"
}

Missing, malformed, revoked or expired API key — or the owning account is inactive.

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example invalidKey
{
"error": "invalid API key"
}

The key exceeded its request budget (300 requests per minute by default).

Media type application/json

The single error shape used by every endpoint.

object
error
required

Human-readable description of what went wrong.

string
Examples
Example limited
{
"error": "rate limit exceeded"
}