GET /q/{hash}/{version} fetches a public snapshot
cursor returned by POST /query. This endpoint is only
for public query results.
curl http://127.0.0.1:8080/q/{hash}/{version}
Do not construct this URL yourself. Treat hash and
version as opaque values from the
Location header.
Cache hit
HTTP/1.1 200 OK
Content-Type: application/json
ETag: {hash}:{version}
Cache-Control: public, max-age=259200
The body is a JSON array:
[{ "id": 7, "email": "ada@example.com" }]
Cache miss
HTTP/1.1 404 Not Found
Content-Type: application/json
{ "name": "NotFound", "message": "unknown cursor" }
The snapshot may have been evicted from PgPaw's in-process cache.
Repeat the original POST /query request to get the
current cursor.
Semantics
The snapshot cursor combines:
- a SQL fingerprint;
- a replication-derived version.
When relevant upstream data changes, the same SQL gets a new cursor. Old cursors keep serving their cached body until they are evicted.
Private query results never use this endpoint. They are returned
inline with Cache-Control: private, no-store.
For the full header policy, see Cache-Control.
Logs
level=INFO target=pgpaw::http::query event=cursor_hit hash=9a4f version=42 bytes=128
level=WARN target=pgpaw::http::query event=cursor_miss hash=9a4f version=41
