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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
family | path | string | Yes | Entity family: client, site, contact, board, ticket, time_entry, kb_category, kb_article |
cursor | query | — | No | Opaque keyset cursor from a previous page's `next_cursor` (the last row id). Absent = start of the family. |
limit | query | — | No | Page size, clamped to [1, 200] (default 100). |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/migration/push/sessionsPOST /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
| Status | Description |
|---|---|
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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/migration/push/sessions/{session_id}/chunksPOST /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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session_id | path | string | Yes |
Request body
PushChunkRequest
Responses
| Status | Description |
|---|---|
200 |
Security: bearer
POST
/api/v1/migration/push/sessions/{session_id}/finishPOST /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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
session_id | path | string | Yes |
Responses
| Status | Description |
|---|---|
200 |
Security: bearer