diff --git a/openapi-v2-old.yaml b/openapi-v2-old.yaml deleted file mode 100644 index 01924e3..0000000 --- a/openapi-v2-old.yaml +++ /dev/null @@ -1,1934 +0,0 @@ - -openapi: 3.0.0 -servers: - - description: Production - url: https://cloud.getdbt.com/api/v2 -info: - version: "2.0.0" - title: dbt Cloud API v2 - termsOfService: 'https://www.getdbt.com/cloud/terms' - description: | - The dbt Cloud API makes it possible to fetch data from your - dbt Cloud account and programmatically run and monitor dbt jobs. - - # How to use this API - - The dbt Cloud API is intended for enqueuing runs from a job, polling for run progress, - and downloading artifacts after jobs have completed running. Operational endpoints around - creating, modifying, and deleting _objects_ in dbt Cloud are still in flux. These endpoints - are largely undocumented in API v2. - - The API docs are generated from an openapi spec defined in the - [dbt-cloud-openapi-spec](https://github.com/fishtown-analytics/dbt-cloud-openapi-spec) - repository. If you find issues in these docs or have questions about using the dbt Cloud - API, please open an issue in the dbt-cloud-openapi-spec repo or contact support@getdbt.com. - - # Authentication - - To authenticate an application with the dbt Cloud API, navigate to the - API Settings page in your [dbt Cloud profile](https://cloud.getdbt.com/#/profile/api/). - If you cannot access this page, confirm that your dbt Cloud account has access to the API, - and that you are using the hosted version of dbt Cloud. If dbt Cloud is running inside of a VPC - in an Enterprise account, contact your account manager for help finding your API key. - - ## TokenAuth - - Once you've found your API key, use it in the Authorization header of requests to the dbt Cloud API. - Be sure to include the `Token` prefix in the Authorization header, or the request will fail with a - "401 Unauthorized" error. Note: `Bearer` can be used in place of `Token` in the Authorization header. - Both syntaxes are equivalent. - - **Headers** - ``` - Accept: application/json - Authorization: Token - ``` - - ## Example request - - The following example will list the Accounts that your token is authorized to access. - Be sure to replace `` in the Authorization header with your actual API token. - - ``` - curl --request GET \ - --url https://cloud.getdbt.com/api/v2/accounts/ \ - --header 'Content-Type: application/json' \ - --header 'Authorization: Token ' - ``` - - # Pagination - - All top-level API resources have support for bulk fetches via "list" API methods. These list - API methods accept `limit` and `offset` query parameters which can be used together to paginate results. - - Offsets begin at 0. - - The maximum limit for a single request is 100. - - contact: - email: support@getdbt.com - -tags: - - name: Accounts - description: List and view Accounts - - name: Projects - description: List, view, and modify Projects - - name: Jobs - description: List, view, and modify, and trigger Jobs - - name: Runs - description: List and view Runs - -paths: - # Accounts - /accounts/: - get: - tags: - - Accounts - summary: List Accounts - description: Use the List Accounts endpoint to list the Accounts that your API Token is authorized to access. - operationId: listAccounts - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountsResponse' - links: - GetAccountById: - operationId: getAccountById - parameters: - accountId: $response.body#/data/0/id - ListProjects: - operationId: listProjects - parameters: - accountId: $response.body#/data/0/id - ListJobsForAccount: - operationId: listJobsForAccount - parameters: - accountId: $response.body#/data/0/id - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /accounts/{accountId}/: - get: - tags: - - Accounts - summary: Get Account - description: Get an Account by its ID - operationId: getAccountById - parameters: - - $ref: '#/components/parameters/accountId' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/AccountResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /accounts/{accountId}/users: - get: - tags: - - Accounts - summary: List Users - description: Use the List Users endpoint to list the Users in the specified Account - operationId: listUsers - parameters: - - $ref: '#/components/parameters/accountId' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/UsersResponse' - /accounts/{accountId}/permissions/{licenseId}: - post: - tags: - - Accounts - summary: Update License - description: Update (or deactivate) permissions for a given license - operationId: updateLicense - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/UserLicense' - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: licenseId - schema: - type: integer - required: true - description: Numeric ID of the License to update - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/UpdateLicenseResponse' - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/projects/: - get: - tags: - - Projects - summary: List Projects - description: Use the List Projects endpoint to list the Projects in the specified Account - operationId: listProjects - parameters: - - $ref: '#/components/parameters/accountId' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectsResponse' - links: - GetProjectById: - operationId: getProjectById - parameters: - accoutnId: $request.path.accountId - projectId: $response.body#/id - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /accounts/{accountId}/projects/{projectId}: - get: - tags: - - Projects - summary: Get Project - description: Get a Project by its ID - operationId: getProjectById - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: projectId - schema: - type: integer - required: true - description: Numeric ID of the Project to retrieve - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/ProjectResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/jobs/: - get: - tags: - - Jobs - summary: List jobs - description: List jobs in a project - operationId: listJobsForAccount - parameters: - - $ref: '#/components/parameters/accountId' - - in: query - name: order_by - example: "-id" - schema: - type: string - description: | - Field to order the result by. Use `-` to indicate reverse order. - - in: query - name: project_id - schema: - type: integer - description: | - Numeric ID of the project containing jobs - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/JobsResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - post: - tags: - - Jobs - summary: Create job - description: Create a job in a project. - operationId: createJob - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - parameters: - - $ref: '#/components/parameters/accountId' - responses: - '201': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/JobResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/jobs/{jobId}/: - get: - tags: - - Jobs - summary: Get job - description: Return job details for a job on an account - operationId: getJobById - parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/jobId' - - in: query - name: order_by - example: "-id" - schema: - type: string - description: | - Field to order the result by. Use `-` to indicate reverse order. - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/JobResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - post: - tags: - - Jobs - summary: Update job - description: Update the definition of an existing job - operationId: updateJobById - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/Job' - parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/jobId' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/JobResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - delete: - tags: - - Jobs - operationId: deleteJobById - summary: Delete job - description: Delete the given job by its id - parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/jobId' - responses: - '200': - description: Job deleted successfully - content: - application/json: - schema: - $ref: '#/components/schemas/JobResponse' - - /accounts/{accountId}/jobs/{jobId}/run/: - post: - tags: - - Jobs - summary: Trigger job to run - description: | - Use this endpoint to kick off a run for a job. When this endpoint returns a successful - response, a new run will be enqueued for the account. Users can poll the [Get run](#operation/getRunById) - endpoint to poll the run until it completes. After the run has completed, users can use the [Get run artifact](#operation/getArtifactsByRunId) - endpoint to download artifacts generated by the run. - operationId: triggerRun - requestBody: - content: - application/json: - example: - cause: Kicked off from Airflow - git_branch: staging - schema_override: dbt_cloud_pr_123 - dbt_version_override: 0.18.0 - target_name_override: staging - timeout_seconds_override: 3000 - generate_docs_override: true - threads_override: 8 - steps_override: - - dbt seed - - dbt run --fail-fast - - dbt test --fail-fast - - schema: - type: object - required: - - cause - properties: - cause: - description: A text description of the reason for running this job - example: "Kicked off from Airflow" - type: string - git_sha: - description: Optional. The git sha to check out before running this job - type: string - git_branch: - description: Optional. The git branch to check out before running this job - type: string - schema_override: - description: Optional. Override the destination schema in the configured target for this job. - example: "dbt_cloud_pr_123_456" - type: string - dbt_version_override: - description: Optional. Override the version of dbt used to run this job - example: 0.18.0 - type: string - threads_override: - description: Optional. Override the number of threads used to run this job - example: 8 - type: integer - target_name_override: - description: Optional. Override the `target.name` context variable used when running this job - example: CI - type: string - generate_docs_override: - description: Optional. Override whether or not this job generates docs (true=yes, false=no) - example: true - type: boolean - timeout_seconds_override: - description: Optional. Override the timeout in seconds for this job - example: 60 - type: integer - steps_override: - type: array - description: Optional. Override the list of steps for this job - example: ['dbt run', 'dbt test', 'dbt source snapshot-freshness'] - items: - type: "string" - parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/jobId' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/RunResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /accounts/{accountId}/runs/: - get: - tags: - - Runs - summary: List runs - description: List the runs for a given account - operationId: listRunsForAccount - parameters: - - $ref: '#/components/parameters/accountId' - - $ref: '#/components/parameters/includeRelated' - - in: query - name: job_definition_id - example: 1234 - schema: - type: integer - description: Optional. Applies a filter to only return runs from the specified Job. - - in: query - name: project_id - example: 1234 - schema: - type: integer - description: Optional. Applies a filter to only return runs from the specified Project. - - in: query - name: status - schema: - type: integer - enum: [1, 2, 3, 10, 20, 30] - example: 10 - description: > - Optional. Applies a filter to return only runs with the specified Status: - - * `1` - The run is queued but hasn't begun being scheduled - * `2` - The run is being removed from the queue and is actively being scheduled - * `3` - The run is currently executing - * `10` - The run completed successfully - * `20` - The run failed to complete - * `30` - The run was cancelled by a user or via the API - - in: query - name: order_by - example: "-id" - schema: - type: string - default: id - enum: - - id - - -id - - created_at - - -created_at - - finished_at - - -finished_at - description: | - Field to order the result by. Use `-` to indicate reverse order. - - All other order_by values will be deprecated on May 15, 2023. - - in: query - name: offset - example: 100 - schema: - type: integer - description: The offset to apply when listing runs. Use with `limit` to paginate results. - - in: query - name: limit - example: 100 - schema: - type: integer - description: The limit to apply when listing runs. Use with `offset` to paginate results. - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/RunsResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /accounts/{accountId}/runs/{runId}/: - get: - tags: - - Runs - summary: Get run - description: Fetch information about a specific run - operationId: getRunById - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: runId - schema: - type: integer - required: true - description: Numeric ID of the run to retrieve - - $ref: '#/components/parameters/includeRelatedRun' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/RunResponse' - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/runs/{runId}/artifacts/: - get: - tags: - - Runs - summary: List run artifacts - description: | - Use this endpoint to fetch a list of artifact files generated for a completed run. - - operationId: listArtifactsByRunId - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: runId - schema: - type: integer - required: true - description: Numeric ID of the run to retrieve - responses: - '200': - description: Success. - content: - application/json: - schema: - type: "array" - example: ['manifest.json', 'catalog.json', 'run_results.json', 'compiled/my_project/my_model.sql'] - items: - type: "string" - description: A list of artifact file paths that can be used with the [getArtifactsByRunId](#operation/getArtifactsByRunId) endpoint - - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/runs/{runId}/artifacts/{path}: - get: - tags: - - Runs - summary: Get a run artifact - description: | - Use this endpoint to fetch artifacts from a completed run. Once a run has completed, - you can use this endpoint to download the `manifest.json`, `run_results.json` or - `catalog.json` files from dbt Cloud. These _artifacts_ contain information about - the models in your dbt project, timing information around their execution, and - a status message indicating the result of the model build. - - **Note:** By default, this endpoint returns artifacts from the _last step_ in the run. - To list artifacts from other steps in the run, use the `step` query parameter described below. - operationId: getArtifactsByRunId - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: runId - schema: - type: integer - required: true - description: Numeric ID of the run to retrieve - - in: path - name: path - schema: - type: string - required: true - example: 'manifest.json' - description: | - Paths are rooted at the `target/` directory. Use `manifest.json`, `catalog.json`, - or `run_results.json` to download dbt-generated artifacts for the run. - - in: query - name: step - schema: - type: integer - required: false - description: | - The index of the Step in the Run to query for artifacts. The first step in the run - has the index `1`. If the `step` parameter is omitted, then this endpoint - will return the artifacts compiled for the last step in the run. - responses: - '200': - description: Success. - content: - application/json: - schema: - type: string - description: Raw file contents product by dbt - example: "# package.yaml - packages: - - package: dbt-labs/audit_helper - version: 0.5.0 - - package: dbt-labs/codegen - version: 0.5.0 - - package: dbt-labs/dbt_utils - version: 0.8.2" - '400': - description: Bad Request. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - /acounts/{accountId}/steps/{stepId}/: - get: - tags: - - Runs - summary: Get step - description: Fetch information about a given step - operationId: getStep - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: stepId - schema: - type: integer - required: true - description: Numeric ID of the step - - $ref: '#/components/parameters/includeRelated' - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/StepResponse' - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - - /accounts/{accountId}/runs/{runId}/cancel/: - post: - tags: - - Runs - summary: Cancel a run - description: Cancel a run in progress - operationId: cancelRunById - parameters: - - $ref: '#/components/parameters/accountId' - - in: path - name: runId - schema: - type: integer - required: true - description: Numeric ID of the run to cancel - responses: - '200': - description: Success. - content: - application/json: - schema: - $ref: '#/components/schemas/RunResponse' - - '404': - description: Unauthorized or Not Found. - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorResponse' - -components: - parameters: - accountId: - in: path - name: accountId - schema: - type: integer - required: true - description: Numeric ID of the account - jobId: - in: path - name: jobId - schema: - type: integer - required: true - description: Numeric ID of the job - includeRelatedRun: - in: query - name: include_related - schema: - type: string - example: '["run_steps", "job"]' - description: | - List of related fields to pull with the run. Valid values are - "trigger", "job", "debug_logs", and "run_steps". If "debug_logs" - is not provided in a request, then the included debug logs will - be truncated to the last 1,000 lines of the debug log output file. - includeRelated: - in: query - name: include_related - schema: - type: string - example: '["trigger", "job"]' - description: | - List of related fields to pull with the run. Valid values are - "trigger", "job", and "debug_logs". If "debug_logs" is not provided - in a request, then the included debug logs will be truncated to the last - 1,000 lines of the debug log output file. - schemas: - Account: - type: object - properties: - id: - type: "integer" - description: A unique identifier for dbt Cloud accounts - example: 1 - name: - type: "string" - description: The name of the dbt Cloud account - plan: - anyOf: - - enum: ["developer", "team", "enterprise"] - - type: "string" - example: team - description: The billing tier for the account - pending_cancel: - type: "boolean" - example: False - description: True if the account is pending cancellation - state: - $ref: '#/components/schemas/State' - developer_seats: - type: "integer" - example: 5 - description: The number of Developer Licenses assigned to the account - read_only_seats: - type: "integer" - example: 50 - description: The number of Read Only Licenses assigned to the account - run_slots: - type: "integer" - example: 5 - description: The number of Run Slots assigned to the account - created_at: - type: "string" - format: "date-time" - updated_at: - type: "string" - format: "date-time" - - User: - type: object - properties: - id: - type: integer - description: A unique identifier for a user - example: 100 - state: - $ref: '#/components/schemas/State' - name: - type: string - description: The user's name - example: John Doe - lock_reason: - type: string - nullable: true - description: The reason an account was locked - unlock_if_subscription_renewed: - type: boolean - description: If set, an admin will be able to unlock it by renewing its subscription - plan: - type: string - enum: [free, trial, enterprise, developer, team, cancelled] - description: The user's plan type - pending_cancel: - type: boolean - run_slots: - type: integer - developer_seats: - type: integer - read_only_seats: - type: integer - queue_limit: - type: integer - pod_memory_request_mebibytes: - type: integer - description: | - The amount of memory (in MiB) to request for scheduled runs and - develop pods on this account. - run_duration_limit_seconds: - type: integer - description: | - The maximum duration a run for this account is permitted to execute - before it is terminated - enterprise_authentication_method: - nullable: true - type: string - enum: [none, okta, azure_ad, gsuite] - enterprise_login_slug: - type: string - nullable: true - enterprise_unique_identifier: - type: string - nullable: true - billing_email_address: - type: string - nullable: true - locked: - type: boolean - unlocked_at: - type: string - format: date-time - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - starter_repo_url: - type: string - nullable: true - description: The account will use this to initialize projects if defined - sso_reauth: - type: boolean - description: | - If set and the account has configured SSO, users will be forced to - re-authenticate with their identity provider periodically - git_auth_level: - type: string - enum: [personal, team] - nullable: true - description: Indicates the git provider authentication level for this user - identifier: - type: string - description: A globally unique identifier - example: act_0ujtsYcgvSTl8PAuAdqWYSMnLOv - docs_job_id: - deprecated: true - freshness_job_id: - deprecated: true - docs_job: - deprecated: true - freshness_job: - deprecated: true - enterprise_login_url: - type: string - nullable: true - description: The enterprise login URL, if available - permissions: - $ref: '#/components/schemas/UserLicense' - State: - type: integer - description: 1 = Active, 2 = Deleted - Project: - type: object - properties: - id: - type: integer - description: A unique identifier for a project - example: 100 - account_id: - type: integer - example: 1 - connection: - $ref: '#/components/schemas/Connection' - connection_id: - type: integer - example: 5000 - dbt_project_subdirectory: - type: string - nullable: true - description: Optional. The path in the attached repository where a dbt project can be found - example: analytics/dbt-models - name: - type: string - description: A name for the project - example: Analytics - repository: - $ref: '#/components/schemas/Repository' - repository_id: - type: integer - example: 6000 - state: - $ref: '#/components/schemas/State' - created_at: - type: "string" - format: "date-time" - updated_at: - type: "string" - format: "date-time" - - BigqueryCredential: - type: "object" - properties: - id: - type: integer - description: "Leave blank when creating a BigqueryCredential object" - account_id: - type: integer - description: "The account id to create the BigqueryCredential in" - type: - type: string - description: "The database type (for BigqueryCredentials, use \"bigquery\")" - state: - type: integer - description: "The state of the BigqueryCredential (1 = present, 2 = deleted)" - schema: - type: string - description: "The schema (dataset) for this BigqueryCredential object" - Connection: - type: object - properties: - id: - type: integer - description: The numeric ID for the connection - account_id: - type: integer - description: The numeric ID for the associated account - project_id: - type: integer - description: The numeric ID for the associated project - name: - type: string - type: - type: string - enum: - - postgres - - redshift - - snowflake - - bigquery - - adapter - state: - $ref: '#/components/schemas/State' - created_by_id: - nullable: true - type: integer - description: The ID of the user who created the connection - created_by_service_token_id: - nullable: true - type: integer - description: The ID of the service token used to create the connection - created_at: - type: string - format: date-time - updated_at: - type: string - format: date-time - details: - oneOf: - - $ref: '#/components/schemas/BigQueryConnectionDetails' - - $ref: '#/components/schemas/RedshiftConnectionDetails' - - $ref: '#/components/schemas/PostgresConnectionDetails' - - $ref: '#/components/schemas/SnowflakeConnectionDetails' - - SnowflakeConnectionDetails: - type: object - properties: - account: - type: string - description: The Snowflake account id - database: - type: string - warehouse: - type: string - allow_sso: - type: boolean - client_session_keep_alive: - type: boolean - - BigQueryConnectionDetails: - type: object - properties: - project_id: - type: string - description: Google BigQuery project ID - timeout_seconds: - type: integer - private_key_id: - type: string - private_key: - type: string - client_email: - type: string - client_id: - type: string - auth_uri: - type: string - token_uri: - type: string - auth_provider_x509_cert_url: - type: string - client_x509_cert_url: - type: string - - RedshiftConnectionDetails: - type: object - properties: - hostname: - type: string - description: The hostname of the Redshift instance - example: "my-redshift.us-east-2.redshift.amazonaws.com" - dbname: - type: string - description: The database name within Redshift - port: - type: integer - description: The port to connect to the Redshift database - tunnel_enabled: - type: boolean - - PostgresConnectionDetails: - type: object - properties: - hostname: - type: string - description: The hostname of the Postgres instance - dbname: - type: string - description: The database name within Postgres - port: - type: integer - description: The port to connect to the Postgres database - tunnel_enabled: - type: boolean - - Environment: - type: object - properties: - id: - type: "integer" - description: A unique identifier for an environment - example: 10 - account_id: - type: "integer" - example: 1 - deploy_key_id: - type: "integer" - created_by_id: - type: "integer" - repository_id: - type: "integer" - name: - type: "string" - description: A name for the environment - dbt_version: - type: "string" - description: The default dbt version for jobs in this environment - example: 0.17.0 - use_custom_branch: - type: "boolean" - example: True - description: If set, use the custom_branch field when cloning and running jobs in this environment - custom_branch: - type: "string" - example: develop - supports_docs: - type: "boolean" - description: dbt Cloud-generated / read only field - state: - $ref: '#/components/schemas/State' - Job: - type: "object" - required: - - id - - account_id - - project_id - - environment_id - - dbt_version - - name - - execute_steps - - state - - triggers - - settings - - schedule - properties: - id: - type: integer - nullable: true - description: Must be `null` when creating a new Job - account_id: - type: integer - example: 1 - project_id: - type: integer - example: 100 - environment_id: - type: integer - example: 10 - name: - type: string - description: A name for the job - example: Nightly run - dbt_version: - type: string - nullable: true - description: Overrides the dbt_version specified on the attached Environment if provided - example: 0.17.1 - triggers: - type: object - required: - - github_webhook - - schedule - properties: - github_webhook: - type: boolean - git_provider_webhook: - type: boolean - schedule: - type: boolean - custom_branch_only: - type: boolean - execute_steps: - type: array - description: "A list of commands that the job will run" - example: ['dbt run', 'dbt test', 'dbt source snapshot-freshness'] - items: - type: string - settings: - type: object - required: - - threads - - target_name - properties: - threads: - type: integer - example: 4 - description: The maximum number of models to run in parallel in a single dbt run - target_name: - example: prod - description: Informational field that can be consumed in dbt project code with `{{ target.name }}` - type: string - state: - $ref: '#/components/schemas/State' - generate_docs: - type: "boolean" - example: True - description: When true, run a `dbt docs generate` step at the end of runs triggered from this job - schedule: - type: object - required: - - date - - time - properties: - cron: - type: string - description: Cron-syntax schedule for the job - example: "0 7 * * 1" - date: - type: object - required: - - type - properties: - type: - type: string - enum: ["every_day", "days_of_week", "custom_cron"] - days: - type: array - nullable: true - items: - type: integer - description: The numeric days of the week, required with days_of_week - cron: - type: string - nullable: true - description: The custom schedule in crontab format, required with custom_cron - time: - type: object - required: - - type - properties: - type: - type: string - enum: ["every_hour", "at_exact_hours"] - interval: - type: integer - nullable: true - description: The number of hours between runs, required with every_hour - hours: - type: array - nullable: true - items: - type: integer - description: The specific hours to run in UTC, required with at_exact_hours - - - Repository: - type: object - properties: - id: - type: "integer" - description: A unique identifier for the Repository - example: 200 - account_id: - type: "integer" - example: 1 - remote_url: - type: "string" - description: The git clone URL for the repository - example: "git@github.com:fishtown-analytics/jaffle_shop.git" - remote_backend: - type: "string" - git_clone_strategy: - type: "string" - enum: - - azure_active_directory_app - - deploy_key - - deploy_token - - github_app - - git_token - deploy_key_id: - type: "integer" - github_installation_id: - type: "integer" - state: - $ref: '#/components/schemas/State' - created_at: - type: "string" - format: "date-time" - updated_at: - type: "string" - format: "date-time" - Step: - type: object - properties: - id: - type: "integer" - description: Unique identifier for a step - run_id: - type: "integer" - description: Unique identifier for a run - account_id: - type: "integer" - description: Unique identifier for an account - logs: - type: "string" - nullable: true - description: High level logs for the given run step - debug_logs: - type: "string" - nullable: true - description: The full debug logs, if requested - log_location: - type: "string" - enum: ["legacy", "db", "s3", "empty"] - log_path: - type: "string" - nullable: true - description: The path to the logs, if available - debug_log_path: - type: "string" - nullable: true - description: The path to the debug logs, if available - log_archive_type: - type: "string" - enum: ["db_flushed", "scribe"] - truncated_debug_logs: - type: "string" - nullable: true - description: A subset of the debug logs - created_at: - type: "string" - format: "date-time" - description: When the step was originally created - updated_at: - type: "string" - format: "date-time" - started_at: - type: "string" - format: "date-time" - description: When processing of the step began - finished_at: - type: "string" - format: "date-time" - description: When the step completed - status_color: - type: "string" - description: A color code, in hex format to display status - example: "#55973a" - status_humanized: - type: "string" - enum: - - "Queued" - - "Starting" - - "Running" - - "Success" - - "Error" - - "Cancelled" - duration: - type: "string" - nullable: true - description: The time it took to run the given step - example: "00:00:23" - duration_humanized: - type: "string" - nullable: true - description: A human-readable version of the step duration - example: "23 seconds" - Run: - type: object - properties: - id: - type: "integer" - description: Unique identifier for a run - example: 10000 - trigger_id: - type: "integer" - account_id: - type: "integer" - example: 1 - project_id: - type: "integer" - example: 100 - job_definition_id: - type: "integer" - status: - type: "integer" - enum: [1,2,3,10,20,30] - description: | - A numeric representation of the job status - 1: Queued - 2: Starting - 3: Running - 10: Success - 20: Error - 30: Cancelled - git_branch: - type: "string" - example: develop - description: Optional. If provided, check out this branch or tag before running the job. - git_sha: - type: "string" - example: "#abcd123" - description: Optional. If provided, check out this sha before running the job. - status_message: - type: "string" - nullable: true - example: Success - dbt_version: - type: "string" - example: 0.17.0 - created_at: - type: "string" - format: "date-time" - description: When the run was initially created (either via the scheduler or via an API request / webhook) - updated_at: - type: "string" - format: "date-time" - dequeued_at: - type: "string" - format: "date-time" - description: When the run was picked up by a processor node - started_at: - type: "string" - format: "date-time" - description: When processing of the node actually began - finished_at: - type: "string" - format: "date-time" - description: When the run completed execution - last_checked_at: - type: "string" - format: "date-time" - last_heartbeat_at: - type: "string" - format: "date-time" - owner_thread_id: - type: "string" - nullable: true - executed_by_thread_id: - type: "string" - artifacts_saved: - type: "boolean" - artifact_s3_path: - type: "string" - has_docs_generated: - type: "boolean" - trigger: - $ref: '#/components/schemas/Trigger' - job: - $ref: '#/components/schemas/Job' - duration: - type: "string" - example: "00:00:12" - queued_duration: - type: "string" - example: "00:00:12" - run_duration: - type: "string" - example: "00:00:12" - duration_humanized: - type: "string" - queued_duration_humanized: - type: "string" - run_duration_humanized: - type: "string" - finished_at_humanized: - type: "string" - status_humanized: - type: "string" - enum: ["Queued", "Starting", "Running", "Success", "Error", "Cancelled"] - created_at_humanized: - type: "string" - Trigger: - type: "object" - properties: - id: - type: "integer" - cause: - type: "string" - job_definition_id: - type: "integer" - git_branch: - type: "string" - git_sha: - type: "string" - github_pull_request_id: - type: "integer" - schema_override: - type: "string" - dbt_version_override: - description: Optional. Override the version of dbt used to run this job - example: 0.18.0 - type: string - threads_override: - description: Optional. Override the number of threads used to run this job - example: 8 - type: integer - target_name_override: - description: Optional. Override the `target.name` context variable used when running this job - example: CI - type: string - generate_docs_override: - description: Optional. Override whether or not this job generates docs (true=yes, false=no) - example: true - type: boolean - timeout_seconds_override: - description: Optional. Override the timeout in seconds for this job - example: 60 - type: integer - steps_override: - type: array - description: Optional. Override the list of steps for this job - example: ['dbt run', 'dbt test', 'dbt source snapshot-freshness'] - items: - type: "string" - created_at: - type: "string" - format: "date-time" - - UserLicense: - type: object - properties: - id: - type: integer - description: The numeric ID for the License - license_type: - type: string - enum: [developer, read_only] - user_id: - type: integer - description: The associated User ID - account_id: - type: integer - description: The associated Account ID - state: - $ref: '#/components/schemas/State' - groups: - type: array - items: - $ref: '#/components/schemas/Group' - permission_statements: - type: array - items: - $ref: '#/components/schemas/PermissionStatement' - - Group: - type: object - properties: - id: - type: integer - description: The numeric ID for the Group - account_id: - type: integer - description: The associated Account ID - name: - type: string - description: The name of the group - example: "Owner" - state: - $ref: '#/components/schemas/State' - assign_by_default: - type: boolean - description: Should the group be assigned by default? - group_permissions: - type: array - items: - $ref: '#/components/schemas/GroupPermission' - - PermissionStatement: - type: object - properties: - permission: - type: string - enum: - - billing_read - - billing_write - - invitations_send - - invitations_modify - - invitations_read - - members_read - - members_write - - groups_read - - groups_write - - license_read - - license_allocate - - projects_read - - projects_develop - - projects_write - - projects_create - - projects_delete - - environments_read - - environments_write - - develop_access - - dbt_adapters_read - - dbt_adapters_write - - credentials_read - - credentials_write - - connections_read - - connections_write - - jobs_read - - jobs_write - - repositories_read - - repositories_write - - runs_trigger - - runs_write - - runs_read - - permissions_write - - permissions_read - - account_settings_write - - account_settings_read - - auth_provider_write - - auth_provider_read - - service_tokens_write - - service_tokens_read - - metadata_read - - webhooks_write - - custom_environment_variables_read - - custom_environment_variables_write - - audit_log_read - target_resource: - type: integer - all_resources: - type: boolean - description: Does this apply to all resources? - - GroupPermission: - type: object - properties: - id: - type: integer - description: The numeric ID for the Group Permission - account_id: - type: integer - description: The associated Account ID - project_id: - type: integer - nullable: true - description: The associated Project ID - all_projects: - type: boolean - description: Does this apply to all projects? - permission_set: - type: string - enum: - - owner - - member - - account_admin - - admin - - database_admin - - git_admin - - team_admin - - job_admin - - job_viewer - - analyst - - developer - - stakeholder - - readonly - - project_creator - - account_viewer - - metadata_only - - webhooks_only - permission_level: - type: integer - nullable: true - state: - $ref: '#/components/schemas/State' - - # responses - AccountsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Account" - status: - $ref: "#/components/schemas/Status" - AccountResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Account" - status: - $ref: "#/components/schemas/Status" - UsersResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/User" - status: - $ref: "#/components/schemas/Status" - UpdateLicenseResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/UserLicense" - status: - $ref: "#/components/schemas/Status" - ProjectsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Project" - status: - $ref: "#/components/schemas/Status" - ProjectResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Project" - status: - $ref: "#/components/schemas/Status" - ConnectionsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Connection" - status: - $ref: "#/components/schemas/Status" - CredentialsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/BigqueryCredential" - status: - $ref: "#/components/schemas/Status" - EnvironmentsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Environment" - status: - $ref: "#/components/schemas/Status" - EnvironmentResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Environment" - status: - $ref: "#/components/schemas/Status" - JobsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Job" - status: - $ref: "#/components/schemas/Status" - JobResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Job" - status: - $ref: "#/components/schemas/Status" - RepositoriesResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Repository" - status: - $ref: "#/components/schemas/Status" - RepositoryResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Repository" - status: - $ref: "#/components/schemas/Status" - RunsResponse: - type: "object" - properties: - data: - type: "array" - items: - $ref: "#/components/schemas/Run" - status: - $ref: "#/components/schemas/Status" - RunResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Run" - status: - $ref: "#/components/schemas/Status" - StepResponse: - type: "object" - properties: - data: - $ref: "#/components/schemas/Step" - status: - $ref: "#/components/schemas/Status" - ErrorResponse: - type: "object" - properties: - status: - $ref: "#/components/schemas/Status" - Status: - type: "object" - properties: - code: - type: "integer" - description: "Same as the HTTP status code returned." - example: 200 - is_success: - type: "boolean" - description: "Whether or not the request succeeded." - user_message: - type: "string" - description: "End-user-friendly description of the response." - developer_message: - type: "string" - description: "Technical description of the response." - - securitySchemes: - TokenAuth: - type: http - scheme: bearer - bearerFormat: "Bearer " - -security: - - TokenAuth: [] diff --git a/openapi-v4.yaml b/openapi-v4.yaml deleted file mode 100644 index e4eaf9a..0000000 --- a/openapi-v4.yaml +++ /dev/null @@ -1,648 +0,0 @@ -openapi: 3.0.0 -info: - title: dbt Cloud API - description: | - The dbt Cloud API makes it possible to fetch data from your - dbt Cloud account and programmatically run and monitor dbt jobs. - - # Deprecation Notice - dbt Cloud API v4 will be DEPRECATED by April 30th, 2023. We are advising migration to - dbt Cloud API v2. You can find out more in [Migrating to dbt Cloud Administrative API v2](https://docs.getdbt.com/docs/dbt-cloud-apis/migrating-to-v2). If you need further help, support for - partners can be provided using shared Slack channels or reaching out to partnerships@dbtlabs.com. - All others can reach out to [dbt Support](https://docs.getdbt.com/docs/dbt-support). - - # Authentication - - To authenticate an application with the dbt Cloud API, navigate to the - API Settings page in your [dbt Cloud profile](https://cloud.getdbt.com/#/profile/api/). - If you cannot access this page, confirm that your dbt Cloud account has access to the API, - and that you are using the hosted version of dbt Cloud. If dbt Cloud is running inside of a VPC - in an Enterprise account, contact your account manager for help finding your API key. - - ## TokenAuth - - Once you've found your API key, use it in the Authorization header of requests to the dbt Cloud API. - Be sure to include the `Token` prefix in the Authorization header, or the request will fail with a - "401 Unauthorized" error. Note: `Bearer` can be used in place of `Token` in the Authorization header. - Both syntaxes are equivalent. - - **Headers** - ``` - Accept: application/json - Authorization: Token - ``` - - # Pagination - - All top-level API resources have support for bulk fetches via "list" API methods. These list - API methods will return a continuation token via the `x-dbt-continuation-token` header to indicate - that there are more results. To request the next page of results, pass the token via the same - header in the next request. If the header is not present in a response, then there are no more - pages to retrive. - - **Header** - ``` - x-dbt-continuation-token: - ``` - - ## Example request - ``` - curl --request GET \ - --url https://cloud.getdbt.com/api/v4/accounts/2563/runs \ - --header 'Content-Type: application/json' \ - --header 'x-dbt-continuation-token: ' - ``` - version: 4.0.0 - -servers: - - url: https://cloud.getdbt.com/api/{version} - variables: - version: - default: v4 - -paths: - /accounts/{accountID}/runs: - parameters: - - $ref: "#/components/parameters/accountIDParam" - - $ref: "#/components/parameters/continuationTokenParam" - - $ref: "#/components/parameters/limitParam" - - $ref: "#/components/parameters/environmentParam" - - $ref: "#/components/parameters/projectParam" - - $ref: "#/components/parameters/jobParam" - - $ref: "#/components/parameters/statusParam" - get: - summary: List all runs - description: | - Returns a list of runs in the account. The runs are returned sorted by creation date, with the most recent run - appearing first. - tags: - - Runs - operationId: list-account-runs - responses: - "200": - description: | - OK - Everything worked as expected. - headers: - x-dbt-continuation-token: - description: | - An opaque value generated by the server that the client can use to paginate resources of the same request. - schema: - type: string - content: - application/json: - schema: - $ref: "#/components/schemas/RunListEnvelope" - example: - { - "data": [ - { - "id": "22336286", - "environment_id": "245", - "account_id": "4387", - "project_id": "2718", - "job_id": "3189", - "trigger": { - "cause": "github_pull_request", - "git_provider": "github", - "pull_request_id": "499", - "git_branch": "feature/new-model", - "git_sha": "e89563ec7a66976cd484223e1529dc5c4d51ffd9", - }, - "replace": { - "schema_with": "dbt_cloud_pr_3189_499", - "target_name_with": null, - "dbt_version_with": null, - "generate_docs_with": null, - "run_steps_with": [ ], - "thread_count_with": null, - "timeout_after_with": 600, - }, - "href": "https://cloud.getdbt.com/api/v4/accounts/4387/runs/22336286", - "status": "Succeeded", - "status_message": null, - "dbt_version": "0.19.2", - "waiting_on": [ ], - "triggered_at": 1625096719, - "created_at": 1625096721, - "updated_at": 1625096803, - "dequeued_at": 1625096734, - "started_at": 1625096739, - "finished_at": 1625096802, - "duration": 81, - "queued_duration": 18, - "run_duration": 63, - "artifacts_saved": true, - "has_docs_generated": false, - "has_sources_generated": false - }, - { - "id": "22335846", - "environment_id": "245", - "account_id": "4387", - "project_id": "2718", - "job_id": "3661", - "trigger": { - "cause": "scheduled", - "git_provider": null, - "pull_request_id": null, - "git_branch": "main", - "git_sha": "7964cf4648f6818dfb09e720f00f2e951cf2611c", - }, - "replace": { - "schema_with": null, - "target_name_with": null, - "dbt_version_with": "0.19.0", - "generate_docs_with": true, - "run_steps_with": [ ], - "thread_count_with": null, - "timeout_after_with": 300, - }, - "href": "https://cloud.getdbt.com/api/v4/accounts/4387/runs/22335846", - "status": "Succeeded", - "status_message": null, - "dbt_version": "0.19.0", - "waiting_on": [ ], - "triggered_at": 1625095824, - "created_at": 1625095826, - "updated_at": 1625095967, - "dequeued_at": 1625095903, - "started_at": 1625095908, - "finished_at": 1625095966, - "duration": 140, - "queued_duration": 82, - "run_duration": 58, - "artifacts_saved": true, - "has_docs_generated": true, - "has_sources_generated": false - } - ] - } - "400": - description: | - Bad Request - The request was unacceptable, often due to missing a required parameter. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "invalid_request_error", - "message": "The provided parameter value is not valid: 'abc'." - } - } - "401": - description: | - Unauthorized - No valid API key provided. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "authentication_error", - "message": "You did not provide an API key. You need to provide your API key in the Authorization header, (e.g., `Authorization: Token YOUR_SECRET_KEY`)." - } - } - "403": - description: | - Forbidden - The API key does not have permissions to perform the request. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "authentication_error", - "message": "The provided API key does not have the permissions necessary to perform the request." - } - } - "404": - description: | - Not Found - The requested resource does not exist. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "invalid_request_error", - "message": "Unrecognized request URL: '/account/1/runs/23320775'." - } - } - - /accounts/{accountID}/runs/{runID}: - parameters: - - $ref: "#/components/parameters/accountIDParam" - - $ref: "#/components/parameters/runIDParam" - get: - summary: Retrieve a run - description: | - Retrieves the details of an existing run with the given runID. - tags: - - Runs - operationId: get-account-run - responses: - "200": - description: | - OK - Everything worked as expected. - content: - application/json: - schema: - $ref: "#/components/schemas/RunEnvelope" - example: - { - "data": { - "id": "22335846", - "environment_id": "245", - "account_id": "4387", - "project_id": "2718", - "job_id": "3661", - "trigger": { - "cause": "scheduled", - "git_provider": null, - "pull_request_id": null, - "git_branch": "main", - "git_sha": "7964cf4648f6818dfb09e720f00f2e951cf2611c", - }, - "replace": { - "schema_with": null, - "target_name_with": null, - "dbt_version_with": "0.19.0", - "generate_docs_with": true, - "run_steps_with": [ ], - "thread_count_with": null, - "timeout_after_with": 300, - }, - "href": "https://cloud.getdbt.com/api/v4/accounts/4387/runs/22335846", - "status": "Succeeded", - "status_message": null, - "dbt_version": "0.19.0", - "waiting_on": [ ], - "triggered_at": 1625095824, - "created_at": 1625095826, - "updated_at": 1625095967, - "dequeued_at": 1625095903, - "started_at": 1625095908, - "finished_at": 1625095966, - "duration": 140, - "queued_duration": 82, - "run_duration": 58, - "artifacts_saved": true, - "has_docs_generated": true, - "has_sources_generated": false - } - } - "400": - description: | - Bad Request - The request was unacceptable, often due to missing a required parameter. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "invalid_request_error", - "message": "The provided parameter value is not valid: 'abc'." - } - } - "401": - description: | - Unauthorized - No valid API key provided. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "authentication_error", - "message": "You did not provide an API key. You need to provide your API key in the Authorization header, (e.g., `Authorization: Token YOUR_SECRET_KEY`)." - } - } - "403": - description: | - Forbidden - The API key does not have permissions to perform the request. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "authentication_error", - "message": "The provided API key does not have the permissions necessary to perform the request." - } - } - "404": - description: | - Not Found - The requested resource does not exist. - content: - application/json: - schema: - $ref: "#/components/schemas/ErrorEnvelope" - example: - { - "error": { - "type": "invalid_request_error", - "message": "Unrecognized request URL: '/account/1/runs/23322631'." - } - } - -components: - parameters: - accountIDParam: - description: | - The account ID to use in a request. - name: accountID - in: path - schema: - type: string - required: true - - runIDParam: - description: | - The run ID to use in a request. - name: runID - in: path - schema: - type: string - required: true - - limitParam: - description: | - A limit on the number of objects to be returned, between 1 and 100. - name: limit - in: query - schema: - type: integer - minimum: 1 - maximum: 100 - - environmentParam: - description: | - A filter on the list based on the object's `environment_id` field. - name: environment - in: query - schema: - type: string - - projectParam: - description: | - A filter on the list based on the object's `project_id` field. - name: project - in: query - schema: - type: string - - jobParam: - description: | - A filter on the list based on the object's `job_id` field. - name: job - in: query - schema: - type: string - - statusParam: - description: | - A filter on the list based on the object's `status` field. - name: status - in: query - schema: - type: string - enum: [ "Queued", "Starting", "Running", "Succeeded", "Failed", "Canceled" ] - - continuationTokenParam: - description: | - A cursor for use in pagination. `x-dbt-continuation-token` is an opaque token that defines - your place in the list. For instance, if you make a list request and receive 100 objects, your - subsequent call can include the token received via the same header to retrieve the next 100 objects. - The number of objects to retrieve can be controlled with the `limit` parameter. - name: x-dbt-continuation-token - in: header - schema: - type: string - - schemas: - RunListEnvelope: - type: object - properties: - data: - type: array - items: - $ref: "#/components/schemas/RunView" - - RunEnvelope: - type: object - properties: - data: - $ref: "#/components/schemas/RunView" - - RunView: - type: object - properties: - id: - type: string - description: | - A unique identifier for the run. - example: "22317410" - environment_id: - type: string - description: | - A unique identifier for the environment. - example: "245" - account_id: - type: string - description: | - A unique identifier for the account. - example: "4387" - project_id: - type: string - description: | - A unique identifier for the project. - example: "2718" - job_id: - type: string - description: | - A unique identifier for the job. - example: "765532" - trigger: - $ref: "#/components/schemas/RunTriggerView" - replace: - $ref: "#/components/schemas/RunReplaceView" - href: - type: string - description: | - A unique URL for the run. - example: "https://cloud.getdbt.com/api/v4/accounts/4387/runs/22317410" - status: - type: string - enum: [ "Queued", "Starting", "Running", "Succeeded", "Failed", "Canceled" ] - description: | - The status of the run is either `Queued`, `Starting`, `Running`, `Succeeded`, `Failed`, or `Canceled`. - example: "Succeeded" - status_message: - type: string - description: | - Information about the run status. - dbt_version: - type: string - description: | - The version of dbt that was used to execute the run. - example: "0.19.2" - waiting_on: - type: array - items: - type: string - description: | - A list of runs that must complete before this one may proceed. - example: [ "22334001" ] - triggered_at: - type: integer - description: | - Time at which the run was triggered. Measured in seconds since the Unix epoch. - example: 1625072428 - created_at: - type: integer - description: | - Time at which the run was created. Measured in seconds since the Unix epoch. - example: 1625072430 - updated_at: - type: integer - description: | - Time at which the run was updated. Measured in seconds since the Unix epoch. - example: 1625072590 - dequeued_at: - type: integer - description: | - Time at which the run was dequeued. Measured in seconds since the Unix epoch. - example: 1625072524 - started_at: - type: integer - description: | - Time at which the run started executing. Measured in seconds since the Unix epoch. - example: 1625072529 - finished_at: - type: integer - description: | - Time at which the run finished executing. Measured in seconds since the Unix epoch. - example: 1625072589 - duration: - type: integer - description: | - The time from when the run was created to when it finished. Measured in seconds. - example: 159 - queued_duration: - type: integer - description: | - The time from when the run was created to when it started executing. Measured in seconds. - example: 99 - run_duration: - type: integer - description: | - Time from when the run started executing to when it finished executing. Measured in seconds. - example: 60 - artifacts_saved: - type: boolean - description: | - Indicates if run artifacts were saved. - example: true - has_docs_generated: - type: boolean - description: | - Indicates if docs were generated as part of the run execution. - example: false - has_sources_generated: - type: boolean - description: | - Indicates if sources were generated as part of the run execution. - example: false - - RunTriggerView: - type: object - properties: - cause: - type: string - description: | - The process by which the run was initiated. - example: "github_pull_request" - git_provider: - type: string - enum: [ "github", "gitlab" ] - description: | - The git provider that initiated the run. - example: "gitlab" - pull_request_id: - type: string - description: | - The pull request id that initiated the run. - example: "499" - git_branch: - type: string - description: | - The git branch that was used to execute the run. - example: "main" - git_sha: - type: string - description: | - The git commit that was used to execute the run. - example: "c7ed89776fd06ea98bb817a1a7d0fd5c9348468d" - - RunReplaceView: - type: object - properties: - schema_with: - type: string - description: | - Replaces the default schema name with the one specified. - example: "dbt_cloud_pr_677_134" - target_name_with: - type: string - description: | - Replaces the default target with the one specified. - example: "staging" - dbt_version_with: - type: string - description: | - Replaces the default dbt version with the one specified. - example: "0.19.0" - generate_docs_with: - type: boolean - description: | - Replaces the default documentation generation behavior with the one specified. - example: true - thread_count_with: - type: integer - description: | - Replaces the default number of threads with the amount specified. - example: 2 - timeout_after_with: - type: integer - description: | - Replaces the run timeout threshold with the one specified. - example: 300 - - ErrorEnvelope: - type: object - properties: - error: - $ref: "#/components/schemas/ErrorView" - - ErrorView: - type: object - properties: - message: - type: string - description: | - A human-readable message providing more details about the error. - example: "The provided parameter value is not valid: '0'." - type: - type: string - enum: [ "invalid_request_error", "authentication_error", "api_connection_error", "api_error", "rate_limit_error" ] - description: | - The type of error returned. One of `invalid_request_error`, `authentication_error`, `api_connection_error`, `api_error`, or `rate_limit_error`. - example: "invalid_request_error"