Get one site
Every worked value below is SYNTHETIC / UNRUN; no action was called.
Read one site with its document tree, collections and current published version.
Request
- Action:
app_topolo_web.sites.get - Method and path:
GET /api/studio/sites/{siteId} - Required permission:
app_topolo_web.studio:read - Input:
{"siteId":"site_synth_01"} - Additional input fields: false
How it behaves
Read-only site detail lookup scoped to the authenticated organization/workspace. The catalog outputSchema is structural: it permits a direct generic site record or an envelope with data/site fields, with only id specified; the pinned route emits the direct buildSiteDetails object shown here. In the D1 path, loadSiteEditorState supplies versions: [] and submissions: [] to that object while passing separate version/submission signals to insights and quality, so publishedVersionCount or submissionCount can be nonzero while these arrays are empty. The in-memory path clones persisted state and can return full per-site version and submission records. Use sites.versions.list for version records and app_topolo_web.sites.submissions.list for submissions. Canonical document and collections are nested at site.draftContent.document and site.draftContent.collections; buildSiteDetails has no standalone documentTree field. (Source: persistence.ts:651-700; sites.ts:695-700; site-helpers.ts:71-113.)
Worked examples
SYNTHETIC / UNRUN — D1 projection has empty record arrays and separate signals
D1-shaped example: versions and submissions record arrays are empty while two version signals and two submission signals still populate insights. Quality uses the submission signals, so the no_form_signal issue is absent. The full-record in-memory path is described above.
HTTP 200; response body (synthetic/unrun):
{
"site": {
"id": "site_synth_01",
"organizationId": "org_synth_01",
"workspaceId": "workspace_synth_01",
"slug": "northstar-studio",
"name": "Northstar Studio",
"status": "published",
"brief": {
"businessType": "service studio",
"audience": "fictional launch teams",
"offer": "launch planning",
"tone": "clear"
},
"draftContent": {
"intent": "business_site",
"siteTitle": "Northstar Studio",
"siteDescription": "A fictional service studio offering careful launch planning.",
"contactEmail": "hello@example.invalid",
"navigation": [],
"footerNavigation": [],
"menus": [],
"styleClasses": [],
"theme": {
"primary": "#111111",
"secondary": "#333333",
"surface": "#ffffff",
"ink": "#111111",
"muted": "#444444",
"accent": "#005fcc",
"accentSoft": "#111111",
"glow": "#111111",
"headingFont": "Inter, system-ui, sans-serif",
"bodyFont": "Inter, system-ui, sans-serif",
"radius": "16px"
},
"document": {
"version": 1,
"pages": [
{
"id": "page-home",
"kind": "page",
"pageId": "page-home",
"label": "Home",
"path": [
"page-home"
],
"source": {
"kind": "page",
"id": "page-home"
},
"value": {
"id": "page-home",
"slug": "/",
"title": "Northstar Studio",
"description": "A fictional service studio offering careful launch planning."
},
"children": [
{
"kind": "slot",
"slotKind": "page-body",
"id": "page-home:body",
"pageId": "page-home",
"label": "Page body",
"path": [
"page-home",
"slot:body"
],
"parentNodeId": "page-home",
"source": {
"kind": "page",
"id": "page-home"
},
"accepts": [
"layout",
"block"
],
"children": [
{
"kind": "block",
"id": "hero-home",
"pageId": "page-home",
"label": "A clear service path",
"path": [
"page-home",
"slot:body",
"sections:0"
],
"source": {
"kind": "section",
"id": "hero-home"
},
"blockKind": "hero",
"sectionKind": "hero",
"sectionId": "hero-home",
"value": {
"id": "hero-home",
"kind": "hero",
"title": "A clear service path",
"body": "Northstar Studio helps fictional teams plan a clear service launch with practical steps, careful review, and a direct path to a first conversation.",
"primaryAction": {
"label": "Contact Northstar",
"href": "mailto:hello@example.invalid",
"linkKind": "custom",
"targetBlank": false
}
},
"children": []
}
]
}
]
}
]
},
"collections": [],
"codeSnippets": [],
"seo": {
"metaTitle": "Northstar Studio | Example",
"metaDescription": "A fictional service studio for example.invalid readers."
}
},
"draftPreviewToken": "draft-preview-synth-01",
"createdAt": "2026-10-20T10:00:00.000Z",
"updatedAt": "2026-10-23T02:30:00.000Z",
"currentVersionId": "version_synth_02"
},
"versions": [],
"domains": [
{
"id": "domain_synth_01",
"organizationId": "org_synth_01",
"workspaceId": "workspace_synth_01",
"siteId": "site_synth_01",
"hostname": "northstar.example.invalid",
"kind": "custom",
"status": "active",
"dnsTarget": "target.example.invalid",
"verificationToken": "verification-synth-01",
"isPrimary": true,
"createdAt": "2026-10-20T10:00:00.000Z",
"updatedAt": "2026-10-23T02:30:00.000Z"
}
],
"assets": [],
"submissions": [],
"events": [],
"insights": {
"publishedVersionCount": 2,
"totalDomains": 1,
"activeDomains": 1,
"pendingDomains": 0,
"submissionCount": 2,
"assetCount": 0,
"lastPublishedAt": "2026-10-22T12:00:00.000Z",
"recentEvents": []
},
"qualityReport": {
"generatedAt": "2026-10-23T02:30:00.000Z",
"score": 96,
"issues": [
{
"id": "asset_library_empty",
"severity": "info",
"title": "No assets in the library yet",
"detail": "Load at least a logo or hero reference so the site can move beyond pure text-only scaffolding."
}
]
},
"agentSessions": []
}
SYNTHETIC / UNRUN — site is missing or outside the selected workspace
HTTP 404; response body (synthetic/unrun):
{
"error": "Site not found"
}
Errors and recovery
Source route returns HTTP 404 with the localized siteNotFound text when the site is absent or outside the active organization/workspace. The descriptor separately declares generic auth/input/dependency errors. Exact auth failure envelope is not source-qualified here. Confirm the site ID with sites.list in the intended workspace, then retry get. Do not treat an empty or mismatched workspace selection as proof the site was deleted.
Who should use this guide
For site operators reviewing the current editable/published record. Pair with the typed guide for SDK/agent consumers because this descriptor allows direct-or-envelope responses with only structural site typing.
Provenance and change log
Pinned d9 source d9c75819abedaf71f9436a1d200015883a291072 (tree 186133adb5823723307184dcbd77acb1814317a1) plus the exact saved action descriptor in the current detailed catalog. The action metadata in the saved detailed catalog is bound by SHA-256 0d37dbcd6b71ee45f4e09d2a34dcb8331676dd2c0ea2184460400ec1abe688fc. Relevant implementation paths at revision d9c75819abedaf71f9436a1d200015883a291072: apps/api/src/routes/studio.ts:375-380, apps/api/src/repositories/store/persistence.ts:651-700, apps/api/src/repositories/store/sites.ts:695-700, apps/api/src/repositories/store/site-helpers.ts:71-113, packages/render/src/site-runtime.ts:51-64, packages/render/src/site-quality.ts:752-759. Current-source freshness beyond the saved d9/release association is UNKNOWN; this is not fresh production action readback.
Change log — 2026-10-23 — source-derived guide content: aligned method/path/permission and input to the saved current descriptor; added synthetic/unrun branch examples; documented the structural output-schema alternatives, direct route shape, source behavior, and recovery.
Correction change log — 2026-10-23: distinguished the D1 detail projection (empty versions/submissions arrays) from memory-path full records, kept signal-derived counts distinct, and directed readers to versions.list and submissions.list.
Unresolved: The route-localized not-found text and exact authorization error envelope are not verified by execution.