dbt

Update dbt environment

Changed on
<Note> The permissions required depend on who owns the environment:
  • Your own personal environment - Restricted Querier permissions or higher on the connection
  • A shared environment - Connection Admin or Organization Admin permissions
  • Another user's personal environment - Organization Admin permissions </Note>

Update an existing dbt environment on the specified connection. This request replaces the environment: name and targetSchema are required, and any omitted optional field is reset to its default. In particular, omitting ownerId sets it to null, which converts the environment to a shared one and requires Connection Admin permissions - send your own membership ID when updating your own environment.

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

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/connections/{connectionId}/dbt/environments/{environmentId}
  • Auth
    HTTP bearer

Path parameters

connectionIdstring uuid required

The unique identifier of the connection

environmentIdstring uuid required

The unique identifier of the dbt environment

Request body

namestring required

The name of the dbt environment

targetSchemastring required

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

Defines the owner of the environment, which also determines whether the environment is personal or shared. Defaults to null when omitted, so always send the current owner's ID unless you intend to change it.

  • Personal environment - Use the organization membership ID of the user that owns the environment, not their user ID. Organization Admin permissions are required to set the ID of a user other than the authenticating user. Get your own membership ID from the Who Am I API, or another user's from the Get model roles API.
  • Shared environment - Set to null. Requires Connection Admin or Organization Admin permissions.
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 organization membership 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

Changes

    • breaking

      the request property became required

    • breaking

      the request property became required