imports

Plan a data import — report what will be created, rewritten and refused, and hand back the upload credential + per-table commands (owner/admin)

Owner/admin. Pure except for minting the upload credential: nothing is created and no job row is written, so an abandoned plan leaves nothing behind. On the default staging_push path the response carries a write-only credential valid for 12 hours (re-plan to mint another) and one INSERT INTO FUNCTION s3(…) per table for you to run on YOUR ClickHouse — no data passes through this API. Anything you push is transfer scratch: the staging bucket deletes it after 2 days, so start the import before then. See transfer/limits for this deployment's exact values.

post/v1/projects/{project_id}/imports/plan

Request

  • Base URL: https://api.wavehouse.cloud
  • URL: https://api.wavehouse.cloud/v1/projects/{project_id}/imports/plan
  • Auth: one of:
    • API key in cookie whc_session
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

project_idstring required

Request body

path'staging_push' | 'remote_pull' | 'object_store_pull'

how the data reaches us. Default staging_push: you run one INSERT INTO FUNCTION s3(…) per table against a credential we mint. remote_pull: we SELECT out of your ClickHouse (zero commands, needs reachability). object_store_pull: you export to your own bucket and we read it

read_only_userstring

remote_pull only: the name to use in the generated CREATE USER/GRANT statements (default whc_import)

Response

OK

applyableboolean required

false when anything was refused: fix or drop those tables and re-plan

job_idstring required

pass this back when starting the import — on the staging path it is also the upload prefix, so a different id is a different, empty upload

pathstring required
plan_digeststring required

fingerprint of this exact plan; pass it to the start endpoint to prove the plan you approved is the plan that runs

warningsstring[]

Changes

No recorded changes to this operation across all 1 revision of this API.