Kanorio

API 参考

Pages

Content Delivery API: GET /pages, GET /pages/{slug}

本页只有英文版。API 参考、Webhook 事件和更新日志保持英文,与代码中的字段名称、错误码一致。
Base URL https://{site}/api/v1ErrorsPagination

Parameters

  • localestring · query

    Locale for page titles and SEO fields. One of the site's locales from /site (a code such as `en-US` or the URL prefix such as `en`); omit it for the primary locale. Other values, including locales that are still translating, return 400 UNSUPPORTED_LOCALE. Untranslated fields fall back to the primary locale. On multilingual sites each page carries resolvedLocale and availableLocales. Slugs stay in the primary locale's path space; prefix them with the locale's pathPrefix.

  • limitinteger · query

    Maximum number of items to return, 1-100. Defaults to 20.

  • cursorstring · query

    Opaque cursor from the previous page's nextCursor. Omit for the first page.

Response 200

  • dataobject[]required
  • data[].resolvedLocalestring

    Multilingual sites only: the locale this page was delivered in (the requested locale when it has a published translation, otherwise the primary locale).

  • data[].availableLocalesstring[]

    Multilingual sites only: locales with a published translation of this page (the primary locale is not listed). Use it for hreflang and canonical.

  • data[].localePathsobject

    Multilingual sites only: this page's path in every live locale, keyed by locale code, without the locale prefix (each locale can have its own translated slug). Use it for hreflang, a language switcher and sitemap alternates.

  • data[].idstringrequired
  • data[].slugstringrequired
  • data[].pathstringrequired
  • data[].parentSlugstring | nullrequired
  • data[].isDirectorybooleanrequired
  • data[].depthintegerrequired
  • data[].ancestorsobject[]required
  • data[].ancestors[].slugstringrequired
  • data[].ancestors[].pathstringrequired
  • data[].ancestors[].titlestringrequired
  • data[].breadcrumbsobject[]required
  • data[].breadcrumbs[].labelstringrequired
  • data[].breadcrumbs[].hrefstringrequired
  • data[].breadcrumbSource"path" | "override"required
  • data[].titlestringrequired
  • data[].pageTypestringrequired
  • data[].isHomePagebooleanrequired
  • data[].orderintegerrequired
  • data[].globalHeaderIdstring | null
  • data[].globalFooterIdstring | null
  • data[].seoobjectrequired
  • data[].seo.ogImageFramingobject | null

    Optional presentation framing for the share image (fitMode, padColor, focus, screens).

  • data[].publishedAtstring | null
  • data[].updatedAtstring
  • hasMorebooleanrequired

    True when another page exists; pass nextCursor to fetch it.

  • nextCursorstring | nullrequired

    Cursor for the next page, or null on the last page.

Errors

  • UNSUPPORTED_LOCALE 400
  • INVALID_CURSOR 400
curl -X GET "https://{site}/api/v1/pages"

Parameters

  • slugstring · pathrequired
  • localestring · query

    Locale for the page title, SEO fields and section text. One of the site's locales from /site (a code such as `en-US` or the URL prefix such as `en`); omit it for the primary locale. Other values, including locales that are still translating, return 400 UNSUPPORTED_LOCALE. Untranslated fields fall back to the primary locale. On multilingual sites the page carries resolvedLocale and availableLocales (use them for canonical and hreflang). Slugs and in-content links stay in the primary locale's path space; prefix them with the locale's pathPrefix.

Response 200

  • pageanyrequired
  • assetsobjectrequired

Errors

  • PAGE_NOT_FOUND 404
  • UNSUPPORTED_LOCALE 400
curl -X GET "https://{site}/api/v1/pages/{slug}"