Content

Get a category

Reads one category in one language, with its own content as markdown. To change a category, edit it in its source and sync; this API does not write content.

GET
/sites/{site_id}/categories/{category_id}
cURL
curl --request GET \
  --url 'https://api.notiondesk.so/sites/{site_id}/categories/{category_id}' \
  --header 'Authorization: Bearer <token>'

Авторизация

  • Authorizationstringheader

    api_key · http · bearer

    read
  • Authorizationstringheader

    oauth · oauth2

    read

Параметры пути

  • site_idstringобязательно

    The id of a site from List sites.

  • category_idstringобязательно

    The id of a category from List categories.

Параметры запроса

  • localestring

    The language to read. Defaults to the site's default_locale; an empty value reads the default.

Заголовки

  • nd-versionstring

    The contract version your integration was written against. Without it, the request uses the current version. An unknown value answers 400 invalid_version.

Ответы

The category.

Заголовки

  • nd-versionstring

    The contract version that answered the request.

  • X-RateLimit-Limitinteger

    Requests allowed per minute: 120 for GET, 20 for writes, per key or OAuth grant.

  • X-RateLimit-Remaininginteger

    Requests left in the current window.

  • Retry-Afterinteger

    Seconds until the next request is accepted; 0 while requests remain.

  • idstringобязательно

    The category identifier.

  • typestringобязательно
  • titlestring | nullобязательно

    The category name.

  • slugstring | nullобязательно

    The category's path segment on the site.

  • textstringобязательно

    The category's own content as markdown, empty when it has none.

  • urlstring | nullобязательно

    The category's public address.

  • localestringобязательно

    The language of this response.

  • last_updatedstring | nullобязательно

    When the category last changed.

  • statusstring | nullобязательно

    The category's publication status, for example published.

  • content_availablebooleanобязательно

    Whether Notiondesk holds content for this language yet.

  • truncatedbooleanобязательно

    true when text was cut at the 200,000-byte ceiling; the cut always falls on a whole character.

  • sync_in_progressbooleanобязательно

    Whether a sync of this category is running.

  • sync_timeoutbooleanобязательно

    Whether the last sync of this category timed out.

  • sync_failedbooleanобязательно

    Whether the last sync of this category failed.

  • sync_error_codestring | nullобязательно

    Why the last sync failed.