Resolve the current preview session to a dataset + view + optional document
GET/projects/{projectSlug}/preview/resolveRequires an active preview session — either the cairn_preview cookie set by createPreviewHandler, or a preview session token sent as Authorization: Bearer <token>.
Path parameters
projectSlug* | string | The project's slug |
Query parameters
token | string | Preview token, as a fallback for callers that can't set an Authorization header (e.g. a WebSocket handshake) |
Responses
| 200 | What the session grants preview access to |
| 401 | Missing, invalid, expired, or revoked preview session |
Request
curl "https://api.cairn.press/projects/my-project/preview/resolve?token=token" \
-H "Authorization: Bearer $CAIRN_PREVIEW_TOKEN"Response · 200
{
"datasetId": "string",
"view": "draft",
"documentType": "string",
"documentId": "string"
}