dbt Cloud Object Management API Endpoints

Number of APIs: 74

Disclaimer

This collection is intended to aid dbt Cloud users who wish to use the Cloud API to automate certain processes, e.g. for replicating resources across accounts, projects, environments etc. OR for standardizing project creation for business teams.

This documentation DOES NOT guarantee that the underlying dbt Cloud endpoints will never change. We make best efforts to test and validate the collection on an ongoing basis.

Introduction

This collection contains a set of endpoints that can be used for managing resources in dbt Cloud. The endpoints documented here can be used to address use cases such as:

  • Creating, triggering, and monitoring dbt Cloud jobs
  • Migrating dbt Cloud resources (projects, environments, jobs, etc.) among dbt Cloud accounts.
  • Managing user and group permissions

Obtaining your dbt Cloud API Key

The dbt Cloud API uses tokens to authenticate requests, and supports two different types of tokens:

  • User Tokens
    • Enable the same permissions associated with your user license in the UI
    • Retrieve from your User Profile (top right icon) > API Access
  • Service Tokens

Tokens obtained using either of the methods above are used in the Authentication header of requests sent to the dbt Cloud API.

Base URL for Multi and Single-Tenant Deployments

If your dbt Cloud account is deployed on our multi-tenant infrastructure, the base URL for the API will look like https://cloud.getdbt.com

Single Tenant base URLs look a bit different, for example: https://[environment].[customer].getdbt.com

If you have questions about the base URL to use for your deployment, reach out to support@getdbt.com

  1. Create URIs - Associate Repository and Connection with Project POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/

  2. Create URIs - Create Development Environment POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/environments/

  3. Retrieval URIs - Retrieve All Job Runs for an Account GET {{base_url}}/api/v2/accounts/{{account_id}}/runs/

  4. Retrieval URIs - Retrieve Job Run Information GET {{base_url}}/api/v2/accounts/{{account_id}}/runs/{{run_id}}/?include_related=["run_steps"]

  5. Retrieval URIs - Retrieve Job Record GET {{base_url}}/api/v2/accounts/{{account_id}}/jobs/{{job_id}}

  6. Create URIs - Create Project POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/?project_name=Test1557

  7. Create URIs - Create Connection - Adapter for Databricks POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/adapters/

  8. Create URIs - Create Credentials - Databricks POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/credentials/

  9. Create URIs - Create Repository - Github Application POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/repositories/

  10. Create URIs - Create Environment Variables - Project / Environment Level POST {{base_url}}/api/v3/accounts/{{account_id}}/projects/{{project_id}}/environment-variables/bulk/