Skip to content

Aurora 1.0 is out!

What's new →
Docs menu

AI and integrations

REST and GraphQL APIs

Read pages, menus, media and settings from apps, with API keys and scopes.

Switch either API on under Settings › Integrations. Both are read-only and only show what visitors may see: live pages that aren't password-protected or members-only, files those pages use, and public settings.

The REST API settings: switched on, whether a key is needed, and how to call it
Settings › Integrations › REST API: on, whether a key is needed, and how to call it.

REST

At /api/aurora/v1. Add ?locale=nb for another language.

EndpointReturnsScope
GET /pages (?page=2, ?parent={id})Live pages in brief, 50 per pagepages.list
GET /pages/{id}A page with its structured blocks and SEOpages.read
GET /page?path=/aboutThe page at an address (/ is the homepage)pages.read
GET /search?q=pricingSearch results with a snippet and scoresearch
GET /media, GET /media/{id}Files the pages use, with sizes and srcsetmedia.read
GET /menus/{location}A menu and its itemsmenus.read
GET /settingsThe site's public settingssettings.read
~ Terminal
$ curl https://example.com/api/aurora/v1/page?path=/docs \
$      -H "Authorization: Bearer aurora_…"

GraphQL

At /api/aurora/graphql (POST {"query": "…"}). It offers pages, page(id:, path:), search(query:), menu(location:), settings, media(id:) and mediaList, and tools like GraphiQL, Altair and Postman can read its schema. Queries nested more than 10 levels deep are turned away.

GraphQL
{
  page(path: "/") {
    title
    seo { title description image { url width height } }
    blocks
  }
  menu(location: "header") { items { title url children { title url } } }
}

Structured blocks

IDs in block data come out as what they point at: images and files with their URLs, sizes, srcset, alt text and focal point; page links with the page's title, path and URL; forms with their fields; rich text as cleaned HTML.

API keys

  • Either API can require a key; the same keys work for both. Apps send it as Authorization: Bearer <key>, never in the address.
  • Each key is named after what uses it, shown once, stored hashed, and revocable: under Settings › Security › API keys, or Manage keys on each API's tab.
  • Each key has scopes: list pages, read page content, search, read files, read menus and read settings. A request outside them is refused.
API keys, each named after what uses it, with its scopes and when it was last used
API keys: each named, with its scopes and when it was last used.