Sync

Get a site's sync status

Reads a site's scheduled sync: whether it is on, how often it runs, its next run and its recent runs.

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

認可

  • Authorizationstringheader

    api_key · http · bearer

    read
  • Authorizationstringheader

    oauth · oauth2

    read

パスパラメータ

  • site_idstring必須

    The id of a site from List sites.

ヘッダー

  • 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 sync status.

ヘッダー

  • 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.

  • auto_sync_enabledboolean必須

    Whether the site syncs from its source on a schedule.

  • frequencystring | null必須

    How often the scheduled sync runs; null when scheduled sync is off.

  • next_sync_atstring | null必須

    When the next scheduled sync starts; null when scheduled sync is off or none is planned.

  • current_statusstring必須

    in_progress while a scheduled run is going, failed when the latest run failed, otherwise idle.

  • recent_runsobject[]必須

    Up to the 10 most recent scheduled runs, newest first.

    • started_atstring | null必須

      When the run started.

    • finished_atstring | null必須

      When the run ended; null while it runs.

    • statusstring必須
    • messagestring必須

      A short description of the outcome.

    • error_categorystring | null必須

      The cause of a failed run.

    • requires_customer_actionboolean必須

      Whether the failure needs you to fix something, for example a Notion connection, before the next run can succeed.