Environments

POST /api/v3/accounts/{account_id}/projects/{project_id}/environments/

Changed on

Create a new Environment

Request

  • Base URL
    https://cloud.getdbt.com
  • Auth
    HTTP bearer

Path parameters

account_idinteger required
project_idinteger required

Request body

account_idinteger required

The account the environment is associated with

project_idinteger required

The project the environment is associated with

credentials_idinteger

The id of the associated credentials. Null for development environments. Must be included when updating a deployment environment or the value will be reset to null.

connection_idinteger

The id of the associated connection. Must be included when updating an environment or the value will be reset to null.

extended_attributes_idinteger
namestring required

The name of the environment

dbt_versionstring required

The default dbt Version to use for this environment

type'development' | 'deployment' required
  • development - DEVELOPMENT
  • deployment - DEPLOYMENT
use_custom_branchboolean required
custom_branchstring
supports_docsboolean required
deployment_type'production' | 'staging'
  • production - production
  • staging - staging
enable_model_query_historyboolean
enable_dbt_stateboolean
enable_dbt_state_model_lockboolean required
stateinteger required

A value of 1 means this entity is active and a value of 2 means this entity is deleted

primary_profile_idinteger

The id of the primary profile for this environment

Example request

{
  "state": 1
}

Response

Example response

{
  "data": {
    "state": 1,
    "project": {
      "state": 1
    },
    "credentials": {
      "state": 1
    }
  }
}

Changes

    • breaking

      added the new required request property (media type: application/json)

    • breaking

      added the new required request property (media type: application/x-www-form-urlencoded)

    • breaking

      added the new required request property (media type: multipart/form-data)

    • info

      added the optional property / to the response with the status

    • breaking

      for the path request parameter account_id, the format changed from no format to int64

    • breaking

      for the path request parameter project_id, the format changed from no format to int64