Documentation menu

API reference

5 operations in migration. Raw spec: openapi.json.

GET/api/v1/migration/pull/{family}

GET /api/migration/pull/{family} — stateless cursor-paged export of one entity family: internal id + stable external key + the canonical import projection. Keyset-paged on the uuidv7 id (creation order), so pages never skip or repeat rows under concurrent writes.

Parameters

NameInTypeRequiredDescription
familypathstringYesEntity family: client, site, contact, board, ticket, time_entry, kb_category, kb_article
cursorquery—NoOpaque keyset cursor from a previous page's `next_cursor` (the last row id). Absent = start of the family.
limitquery—NoPage size, clamped to [1, 200] (default 100).

Responses

StatusDescription
200

Security: bearer

POST/api/v1/migration/push/sessions

POST /api/migration/push/sessions — opens a connector push session over a fresh D2 import batch. One session targets exactly one entity kind; cross-family ordering is the tool's run script's job (the D2 import order: client → site → contact → board → ticket → time entry).

Request body

CreatePushSessionRequest

Responses

StatusDescription
201

Security: bearer

GET/api/v1/migration/push/sessions/{session_id}

GET /api/migration/push/sessions/{id} — the resume view: where the checkpoint stands and which chunks committed.

Parameters

NameInTypeRequiredDescription
session_idpathstringYes

Responses

StatusDescription
200

Security: bearer

POST/api/v1/migration/push/sessions/{session_id}/chunks

POST /api/migration/push/sessions/{id}/chunks — plans then executes ONE chunk through the D2 commit path, then stamps the checkpoint. A fail-policy chunk with any conflict persists nothing and returns the typed 409 with the full per-row report (checkpoint untouched — fix the rows and re-send the same index).

Parameters

NameInTypeRequiredDescription
session_idpathstringYes

Request body

PushChunkRequest

Responses

StatusDescription
200

Security: bearer

POST/api/v1/migration/push/sessions/{session_id}/finish

POST /api/migration/push/sessions/{id}/finish — closes the session and its D2 batch, emitting BOTH the engine lifecycle event (`import.batch_finished`) and the connector-level `migration.push_session_finished`.

Parameters

NameInTypeRequiredDescription
session_idpathstringYes

Responses

StatusDescription
200

Security: bearer