Skip to main content
PUT
/
v1
/
connections
/
{connectionId}
/
dbt
/
environments
/
{environmentId}
curl --request PUT \
  --url https://{instance}.omniapp.co/api/v1/connections/{connectionId}/dbt/environments/{environmentId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Development",
  "targetSchema": "dev_schema"
}
'
{
  "id": "247dc6dc-2a58-4688-9521-c5ed3e99c1e8",
  "name": "Development",
  "isDefaultEnvironment": false,
  "ownerId": "550e8400-e29b-41d4-a716-446655440000",
  "targetDatabase": "analytics_dev",
  "targetName": "custom_target",
  "targetRole": "developer",
  "targetSchema": "dev_schema",
  "variables": {
    "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
    "name": "DBT_TARGET",
    "value": "staging",
    "isSecret": false
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.omni.co/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

connectionId
string<uuid>
required

The unique identifier of the connection

environmentId
string<uuid>
required

The unique identifier of the dbt environment

Body

application/json
name
string

The name of the dbt environment

Minimum string length: 1
Example:

"Development"

targetSchema
string

The target schema for the environment

Minimum string length: 1
Example:

"dev_schema"

ownerId
string<uuid> | null

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.

Example:

"550e8400-e29b-41d4-a716-446655440000"

targetDatabase
string | null

Target database override

Example:

"analytics_dev"

targetName
string | null

Target name override

Example:

"custom_target"

targetRole
string | null

Target role override

Example:

"developer"

variables
object[]

Environment variables for the dbt environment. To update existing variables, include the variable id field. New variables should omit the id field.

Response

dbt environment updated successfully

id
string<uuid>

Unique identifier of the dbt environment

name
string

The name of the dbt environment

isDefaultEnvironment
boolean

Whether this is the default environment

ownerId
string<uuid> | null

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

targetDatabase
string | null

Target database override

targetName
string | null

Target name override

targetRole
string | null

Target role override

targetSchema
string

Target schema for the environment

variables
object[]

Environment variables