Skip to main content
POST
Start a dbt sync for a deployment

Authorizations

Authorization
string
header
required

Token authentication. Send Authorization: Bearer <YOUR_TOKEN>.

Path Parameters

deploymentId
integer
required

Body

application/json

StartDbtSyncInput

branchName
string | null
manifest
object | null

The contents of your dbt target/manifest.json, as JSON. Required when source is manifest and ignored otherwise. Produced by dbt parse, dbt compile or dbt build, so a CI job can POST the manifest it just validated and be sure Cube converts exactly that — no re-parse of a branch tip that may already have moved.

namePrefix
string | null

Prefix for this sync’s cube names and file names, e.g. sales_. Overrides the Name prefix saved in the deployment’s dbt settings for this sync only; an empty string means no prefix. Cube names must be unique across the data model, so give each dbt project its own prefix when two projects can share a model name.

output
enum<string> | null

What to do with the generated cubes. branch (the default) commits them to a new Cube branch for review. files commits nothing and creates no branch — the files are returned from GET /dbt-sync/{syncJobId}/generated-files instead, so your own CI can commit them to your repository through its normal review. Independent of source.

Available options:
branch,
files
outputPath
string | null

Repository folder for this sync’s generated cube files, e.g. model/cubes/dbt/sales (a leading / is optional). Overrides the Output path saved in the deployment’s dbt settings for this sync only. A sync replaces the files directly inside this folder and leaves its subfolders alone, so syncing several dbt projects into one deployment works when each gets its own folder and its own namePrefix.

ref
string | null

Git ref in the dbt repository to sync from — a branch or a tag, NOT a commit SHA. Overrides the branch saved on the deployment’s dbt git integration for this sync only, so CI can sync the ref under review (e.g. a pull request’s head branch) instead of the tracked branch. The generated Cube branch is named after it.

source
enum<string> | null

Where the dbt metadata comes from. git (the default) clones the deployment’s dbt repository and runs dbt to produce a manifest. manifest converts a manifest you supply in manifest below, so Cube never needs access to the dbt repository — and the sync takes seconds rather than minutes, because no sandbox is provisioned and no dbt command runs.

Available options:
git,
manifest

Response

200 - application/json
branchName
string
required
syncJobId
string
required
workflowId
string
required