JustFlows

Документация пока доступна только на английском языке. Остальная часть сайта соответствует вашему языку.

Public API

Anonymous REST for published content, types, media, and menus, plus OpenAPI and the public API kill switch.

8 минута чтения

The headless surface is `/api/v1`. It is anonymous: there are no API tokens. A Settings switch, Public API (public_api_enabled), takes the whole /api/v1 (and /api/site) prefix offline for anonymous users. Administrators and editors can still reach it. If the site is unpublished, anonymous callers get 404 unless they can view unpublished sites. GET responses send Access-Control-Allow-Origin: *. Anonymous callers are limited to 120 requests per minute per IP.

Endpoints

MethodPathReturns
GET/api/v1/contentPaginated published entries (includes fields).
GET/api/v1/content/:slugOne published entry by slug.
GET/api/v1/content-typesRegistered type slugs, labels, and field schemas.
GET/api/v1/mediaMedia library items with public URLs.
GET/api/v1/menusNavigation menus with resolved item URLs.
GET/api/v1/menus/:slugOne menu by slug.
GET/api/v1/openapi.jsonOpenAPI 3.1 document for this surface.

List published content

http
GET /api/v1/content?type=post&locale=en&limit=20
QueryMeaning
typeAny registered content type slug (post, page, or a custom type).
slugFilter to one slug.
localeResolved against site languages.
limitPage size, max 100, default 20.
cursorId cursor for the next page.
preview1 includes drafts when the request has an editor or administrator session.

Response: { items, nextCursor, total, locale }. Items include id, type, title, slug, locale, excerpt, fields, and dates. The content.output filter runs on each item.

One item by slug

http
GET /api/v1/content/about?locale=en

Site identity

GET /api/site/identity returns title, tagline, and logo for headless frontends. Public HTML still lives on /, /:segment, /:locale/:slug. GET /theme.css serves the effective theme CSS. There is no GraphQL surface and no webhook delivery in CE.

Careful

Admin JSON under /api/content, /api/users, and the rest requires a session cookie plus CSRF (jf_csrf cookie and x-csrf-token header) on mutating requests. That is not the public API.

Note

The public API is read-only. To push changes out of Justflows as they happen, use outgoing Webhooks.