Help · section 30 of 44
Generic API Sync (API sources)
Mirrors the in-app Help. The live copy in your console and `dlake guide help` are always current.
When the source is an API rather than a database, Generic API Sync teaches the sync agent which endpoints to call. Two halves make the product: the Connection Manager stores how to authenticate (encrypted, its own surface), and this half stores what to call. The apisync_* admin tools cover it: apisync_status (is the product on — a pure read, safe to poll), apisync_enable (provision its schema in the tenant database and set the flag — idempotent, confirm-gated, and on failure the product is left off), apisync_save_endpoint_config (describe one endpoint — see the trap below), apisync_templates / apisync_template_by_id (the shared per-ERP endpoint-template catalogue, read-only from here), and apisync_table_schema (a hosted customer’s real ERP table columns; structurally unavailable for on-premise customers, whose erp_unreachable answer is correct, not a defect).
dlake admin apisync_status --profile <tenant>
dlake admin apisync_enable --profile <tenant> --confirm true
dlake admin apisync_templates --profile <tenant> --erpName SYSPRO
The one trap: the endpoint-config save writes either the configuration JSON or the metadata (auth id, order, soft-delete flag) — never both in one call; sending both upstream would silently discard the metadata, so the tool refuses the mix and requires isDeleted explicitly on the metadata leg. The object name sits outside that split and is required on both calls (the API refuses a blank one, and on the JSON call it is validation only). Endpoint JSON is stored plaintext and read directly by the agent — credentials never go in it; they belong in the Connection Manager configuration it references. Template authoring is deliberately operator-only: the shared catalogue is append-only (no update, no delete), so a bad row is permanent and public to every customer of that ERP. The deeper guide is the dlake-apisync skill.