Docs

JSON API

A read-only public API at /orbiter/api/[collection]. Returns all published entries as JSON.

Endpoints

GET /orbiter/api/[collection]

Returns all published entries in the collection. Same shape as getCollection().

Example

curl https://your-site.com/orbiter/api/posts
[
  {
    "id": "550e8400-...",
    "slug": "my-first-post",
    "status": "published",
    "created_at": "2025-01-01 12:00:00",
    "updated_at": "2025-06-01 09:15:00",
    "data": {
      "title": "My first post",
      "body": "<p>...</p>"
    }
  }
]

Authentication

By default the API is open. To restrict access, set an API token in Settings → Public API. Then pass it as a Bearer token:

curl -H "Authorization: Bearer your-token" https://your-site.com/orbiter/api/posts

Requests without the token return 401 Unauthorized.

Enabling / disabling

The API is enabled by default. Disable it in Settings → Public API → Enable public API.

Use cases

  • Mobile apps that need to fetch content at runtime
  • Third-party integrations (Zapier, n8n, etc.)
  • Preview environments that can't run a full Astro build
  • Incremental builds — fetch only entries updated since a given timestamp (filter client-side on updated_at)
Note: The JSON API is served by the Astro integration, not the standalone admin. It requires the integration to be running (i.e. your Astro site must be deployed in SSR or hybrid mode).