Sync
Get delta
Returns everything that changed since a given cursor, including deletions. This is what the browser extension polls instead of refetching the whole tree.
Endpoint: GET /api/v1/sync
Headers:
Authorization: Bearer <token>
Query parameters:
since(optional): ThesyncedAtvalue from the previous delta response, as an ISO 8601 timestamp. Omit it to request a full snapshot.
Response:
json
{
"syncedAt": "2024-01-01T12:00:00.000Z",
"isFullSync": false,
"collections": [],
"links": [],
"deletedCollectionIds": [4],
"deletedLinkIds": [17, 18]
}Fields:
syncedAt: cursor to send back assinceon the next callisFullSync:truewhen the response is a complete snapshot rather than a delta — either becausesincewas omitted, or because it predates the tombstone retention window (see below). A client receivingtruemust replace its local state instead of merging into it.collections: full Collection objects created or updated since the cursorlinks: full Link objects created or updated since the cursor, each carryingcollectionIdsdeletedCollectionIds/deletedLinkIds: ids removed since the cursor
Notes:
- Deletions are recorded as tombstones kept for 30 days. A cursor older than that can no longer be brought up to date incrementally, so a full snapshot is served instead.
- The cursor is applied with a one-second overlap, so a client may receive rows it already has. Clients are expected to upsert by id.
- An unparseable
sinceis rejected rather than silently treated as "the beginning of time".