Skip to main content
GET
Get a source's diff review state
The reference panel describes the current v3 operation. The notes below describe its v2 compatibility API. Follow the v3 request schema for current calls: v3 can move identifiers from the body or query into the URL. Keep the v2 method, path, and payload together when using the compatibility API.

v2 compatibility notes

GET /api/v2/knowledge/synchronized-sources/diff?sourceId= requires knowledge:read. It answers the source’s diff policy (policy, null when its changes apply without review) and the policy’s revision (policyRevision, which setDiffPolicy takes), the kinds the source declares, canManage (whether this key may decide: it and its owner hold knowledge:manage where the source lives), each recent run’s diff phase, revision and expiresAt, and shrinkGuards: each recent run’s shrink guard, with or without a diff, as its runId, phase, the revision that approveShrink and overrideShrink take, thresholdPercent and the held deletions’ totals (pending, deleted, superseded). A guard’s decider and cursors are never returned. A missing, unreadable or being-removed source answers 404 resource_missing. A run in phase held waits for review: review its diff, then approve or reject it. Only a Personal key is admitted, acting as its owner: the owner must hold the permission where the source lives, and is recorded as the reader, with the key named in the audit. An External App or platform key answers 403 forbidden, recorded: a person reviews and decides a source’s held changes.

Authorizations

Authorization
string
header
required

An External App: the JWT it obtains from POST /oauth/token with OAuth2 client_credentials. Pass as Authorization: Bearer <jwt>. An app's static companion key also authenticates as the app, but is deprecated and is not protected by Idempotency-Key.

Path Parameters

synchronizedSourceId
string
required

The source id returned by listSynchronizedSources.

Minimum string length: 1

Response

Diff review state

data
object
required

A synchronized source's diff review state: its diff policy (null when its changes apply without review) and the policy's revision, which setDiffPolicy takes as expectedRevision; the kinds the source declares; whether the caller may decide (its key holds knowledge:manage where the source lives, and so does its owner); each recent run's diff phase, revision and expiry; and shrinkGuards, each recent run's shrink guard (with or without a diff): its phase, the revision that approveShrink and overrideShrink take, its threshold and the held deletions' totals. A guard in phase review waits for a person's decision. A guard's decider and cursors are never returned.

meta
object
required