Skip to main content
GET
Get Sync Policy

Authorizations

Authorization
string
header
required

Every request authenticates with an API key: Authorization: Bearer {API_KEY}. App endpoints take an app API key; knowledge endpoints take a knowledge base API key (Get Started).

Keep keys server-side; never embed them in client code. Requests with a missing or invalid key fail with HTTP 401 (unauthorized).

Path Parameters

knowledge_base_id
string<uuid>
required

Knowledge base ID: the last segment of the Service API endpoint shown in the knowledge base's API Access dialog (…/knowledge-fs/spaces/<knowledge base ID>), and the segment after /datasets/new/ in the address bar.

source_id
string<uuid>
required

Source ID. From List Sources.

Response

The sync schedule.

created_at
string

Creation time, ISO 8601.

custom_interval_seconds
integer | null

Interval in seconds for mode: custom. null for the other modes.

enabled
boolean

Whether scheduled syncs run. Always false with mode: manual.

expected_source_version
integer

Source version the schedule is bound to.

id
string

Sync policy ID. It stays the same across updates.

knowledge_space_id
string

Internal ID of the knowledge base. Not the knowledge base ID in the path.

mode
string

manual (no schedule), interval (every 24 hours), or custom (every custom_interval_seconds).

next_run_at
string | null

When the next scheduled sync is due, ISO 8601. null when nothing is scheduled.

revision
integer

Schedule revision. Send it as expectedRevision on Update Sync Policy. It increases on every update and every time a scheduled sync starts.

source_id
string

Source the schedule belongs to.

updated_at
string

Last change, ISO 8601. Also moves when a scheduled sync starts.