Build a binding from local (uncommitted) SQL for `vite dev`
const url = 'http://localhost:8080/api/workspaces/example/apps/example/bindings/example/dev-build';const options = { method: 'POST', headers: {cookie: 'auth_session=<auth_session>', 'Content-Type': 'application/json'}, body: '{"source":"example","dbtEnvironment":"example","dbtDefer":true,"refresh":true,"async":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:8080/api/workspaces/example/apps/example/bindings/example/dev-build \ --header 'Content-Type: application/json' \ --cookie auth_session=<auth_session> \ --data '{ "source": "example", "dbtEnvironment": "example", "dbtDefer": true, "refresh": true, "async": true }'The laptop dev loop behind makoData(): send the local bindings/<name>.sql text and get back the parquet of exactly that query, run read-only through the workspace connection its front matter names. The text is the whole input: no sandbox and (for a caller with edit access) no repo state is read, so a binding that exists only in the local checkout builds. Text whose content-addressed build is already stored (the published binding) is served from that artifact; anything else — an edit, a new binding, a refresh, or dbtEnvironment rendering {{ dbt_schema }} against a dev dbt environment (per relation: ones the environment has not built read prod, unless dbtDefer: false) — is a draft: built and streamed back, reused for 30 minutes (same connection + rendered SQL) unless refresh, never stored as the app’s artifact, so published viewers never see it. A draft that keeps failing answers 503 with Retry-After instead of re-running. May redirect to a short-lived signed artifact URL; follow redirects. With async: true, a build (not a stored artifact) answers 202 with a jobId to poll at GET …/binding-jobs/{jobId} instead.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Example generated
{ "source": "example", "dbtEnvironment": "example", "dbtDefer": true, "refresh": true, "async": true}Responses
Section titled “Responses”Redirect to a short-lived signed artifact URL
Successful response
object
Whether the request succeeded.
Endpoint-specific response payload.
Example
{ "message": "Operation completed", "error": "Error message"}Invalid request
object
Example
{ "error": "Error message"}Internal server error
object
Example
{ "error": "Error message"}