---
title: "Read branch dbt environment"
method: GET
path: "/api/v1/models/{modelId}/branch/{branchName}/dbt"
tags: ["Models"]
---

# Read branch dbt environment

`GET /api/v1/models/{modelId}/branch/{branchName}/dbt`

Read the dbt environment a branch resolves to, including the dbt git branch it compiles against. A branch with no environment of its own resolves to the connection's default (production) environment, reported with is_default_environment: true.

## Path parameters

- `modelId` string, uuid, required — Model UUID
- `branchName` string, required — Branch name

## Response `200`

The dbt environment the branch resolves to

- ModelsBranchDbtGetResponse
  - `git_branch` string, required — The dbt git branch the environment compiles against. When none is pinned, this is the resolved default: for a non-production environment on a branch, a git branch named after the Omni branch; otherwise the dbt repo's default branch. If the named branch doesn't exist in the dbt repo, compilation falls back to the repo's default branch.
  - `id` string, uuid, required — ID of the dbt environment the branch resolves to
  - `is_default_environment` boolean, required — True when the branch resolves to the connection's default (production) environment — typically because the branch has no dbt environment of its own.
  - `is_deferral_enabled` boolean, required
  - `manifest_status` 'NOT_FOUND' | 'OUTDATED' | 'UP_TO_DATE', required — Whether the environment's compiled dbt manifest is up to date
  - `name` string, nullable, required
  - `owner_id` string, uuid, nullable, required — User id the environment belongs to (a personal development environment), or null
  - `target_database` string, nullable, required
  - `target_name` string, nullable, required
  - `target_role` string, nullable, required
  - `target_schema` string, required
  - `variables` ModelsBranchDbtEnvironmentVariable[], required
    - `id` string, uuid, required
    - `is_secret` boolean, required
    - `name` string, required
    - `value` string, nullable, required — Always null when is_secret is true.

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required
- `403` — Permission denied
- `404` — Model, branch, or dbt environment not found, or model deleted
- `422` — The model is not a shared model

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/4701f292c621/schema)
