GET /api/public-page/[...slug] endpoint returns the fully resolved page bundle for a given slug. The bundle includes the page’s id, slug, meta object, and a sections array in which all $ref pointers and collection bindings have been resolved to concrete data. Use this endpoint to fetch page data from external tools, preview environments, AI agents, or any client that needs structured content without running a full Next.js render.
Request
- Method:
GET - Path:
/api/public-page/[...slug] - Authentication: None required
string
required
The page slug as a catch-all path segment. For top-level pages, use the page’s slug directly (e.g.,
about). For nested pages, separate segments with / (e.g., posts/write-the-readme-first).Response
200 OK — Returns the fully resolved page bundle as JSON.string
The unique identifier for the page, matching the page’s filename key in
src/data/pages/.string
The URL slug for the page (e.g.,
"about" or "posts/write-the-readme-first").object
SEO metadata object for the page, including
title, description, and optional ogImage.array
Array of fully resolved section objects. All
$ref pointers and collection bindings are expanded to their concrete values — exactly as served to the Next.js page component.Error responses
The response body is identical to the bundle that OlonJS passes to the visitor-facing Next.js route component. Consuming this endpoint gives you the same fully-baked data structure that drives the live rendered page.
.png?fit=max&auto=format&n=AyzhRn9-CO-nDNc4&q=85&s=63c78e2325701880237e6cbce1399c2a)
.png?fit=max&auto=format&n=AyzhRn9-CO-nDNc4&q=85&s=0db283df6e4d31745079d6d03fd029ed)