Download one cached object
Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.
The stored bytes behind a listing row, read straight from cache storage — your origin is never contacted, so this works even when the site is down.
Address the entry by its stored identity: copy hostname, node and
key_hash verbatim from a /domains/{domain}/cache/keys row. node is
the edge location that cached it, so the same URL cached at three
locations is three entries and you choose which copy you get.
The body is returned in its original uncompressed form with the stored
Content-Type, always as an attachment. The cached response's own status
code and age travel in X-Nsin-Cache-Status and X-Nsin-Cached-At — the
HTTP status describes only whether the read succeeded.
A 404 with entry is no longer cached means the listing row outlived
the object (it expired, was evicted, or was purged). Requires
domain.view.
Path parameters
- domainstringrequiredpath
The domain name (for example
example.com) — not a numeric id.
Query parameters
- hostnamestringrequiredquery
The row's
hostname— the storage namespace, not the request host. - nodestringrequiredquery
The row's
node— the edge location holding this copy. Case-sensitive. - key_hashstringrequiredquery
The row's
key_hash.
Responses
200The stored object. Content-Type is whatever was cached; the payload
is the uncompressed body.
Content type: application/octet-stream
400Missing or malformed hostname, node or key_hash.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}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.
{
"error": "invalid API key"
}404Domain or hostname not yours, or the entry is no longer cached.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"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.
{
"error": "rate limit exceeded"
}502The stored entry could not be decoded.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}503Cache storage is unavailable.
Content type: application/json
- errorstringrequired
Human-readable description of what went wrong.
{
"error": "read-only API key"
}Example request
curl -X GET "https://api.nsin.ir/domains/example.com/cache/keys/content?hostname=string&node=string&key_hash=string" \
-H "Authorization: Bearer $NSIN_API_KEY"