v1

latestOpenAPI 3.1.02026-07-2618690613.4 KB
dbt

Update dbt environment

<Note> This endpoint requires **Connection Admin** permissions for the connection. </Note>

Update an existing dbt environment on the specified connection. All fields are optional; only the provided fields will be updated.

put/v1/connections/{connectionId}/dbt/environments/{environmentId}

Path parameters

connectionIdstring uuid required

The unique identifier of the connection

environmentIdstring uuid required

The unique identifier of the dbt environment

Request body

namestring

The name of the dbt environment

targetSchemastring

The target schema for the environment

isDeferralEnabledboolean

Whether deferral is enabled for this environment. Ignored (forced to false) for the default (production) environment.

ownerIdstring uuid nullable

Only valid with Organization API keys. The user ID of the owner for the dbt environment. Personal Access Tokens (PATs) automatically use the authenticated user as the owner.

targetDatabasestring nullable

Target database override

targetNamestring nullable

Target name override

targetRolestring nullable

Target role override

Example request

{
  "name": "Development",
  "targetSchema": "dev_schema",
  "isDeferralEnabled": true,
  "ownerId": "550e8400-e29b-41d4-a716-446655440000",
  "targetDatabase": "analytics_dev",
  "targetName": "custom_target",
  "targetRole": "developer",
  "variables": [
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "name": "DBT_TARGET",
      "value": "production"
    }
  ]
}

Response

dbt environment updated successfully

idstring uuid

Unique identifier of the dbt environment

namestring

The name of the dbt environment

isDefaultEnvironmentboolean

Whether this is the default environment

isDeferralEnabledboolean

Whether deferral is enabled for this environment. Ignored (forced to false) for the default (production) environment.

ownerIdstring uuid nullable

The user ID of the owner of the dbt environment, or null

targetDatabasestring nullable

Target database override

targetNamestring nullable

Target name override

targetRolestring nullable

Target role override

targetSchemastring

Target schema for the environment