dbt Labs Audit Logs API
The Audit Logs API from dbt Labs, for audit logs.
Operations 5
GET
/api/v3/accounts/{account_id}/audit-logs/export/{job_identifier}/download/
Download bulk audit log export
#
The Audit Logs API from dbt Labs, for audit logs.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/dbtlabs:dbtlabs-audit-logs-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: dbt Cloud API v3 Audit Logs API
version: 3.0.0
description: '# How to use this API
The dbt Cloud API v3 contains endpoints for programmatic administration of your dbt Cloud account.
With it, you can replicate resources across projects, accounts, and environments, or standardize project
creation for business teams. For endpoints related to jobs and runs, refer to the
Discovery API or dbt Cloud API v2.
The API docs are generated from an openapi spec defined in the
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
Account Settings page and go to Personal Tokens from the left sidebar. Create one if you don''t have one already.
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 account-scoped Personal Access Token.
Once you''ve found your Personal Access Token (PAT) for your account, 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 support bulk fetches using the "list" or `GET` API methods. These API methods accept `limit` and `offset` query parameters that you can use together to paginate results and return a subset of those results.
* Offset: Specifies how many records to skip. Can be an integer 0 and higher.
* Limit: Specifies the maximum records you want to retrieve in a single request. Can be an integer up to 100. This limit makes responses easier to handle for servers and people.
Endpoints that support pagination include some useful extra information about the pagination state. For example:
```json
{
data: [...],
extra: {
// How the results were filtered
filters: {...},
// The order of the results
order_by: "id",
// The pagination state
pagination: {
// The number of records returned in this response
count: 5,
// The total number of available records
total_count: 10,
}
}
}
````
## Example request
The following example uses the list projects endpoint to list the projects that your token is authorized to access.
This request skips the first 10 projects and lists the next 10 projects.
Be sure to replace `` in the Authorization header with your actual API token and `` with your actual account ID.
```bash
curl --request GET \
--url ''https://cloud.getdbt.com/api/v3/accounts//projects/?limit=10&offset=5'' \
--header ''Content-Type: application/json'' \
--header ''Authorization: Token ''
```'
termsOfService: https://www.getdbt.com/terms-of-service
contact:
email: support@getdbt.com
servers:
- url: https://cloud.getdbt.com/
description: Production (US)
- url: https://{account_prefix}.us1.dbt.com/
description: Production (US)
variables:
account_prefix:
default: ab123
description: Your unique account prefix. Can be found on your account settings page.
- url: https://emea.dbt.com/
description: Production (Europe)
- url: https://au.dbt.com/
description: Production (AU)
tags:
- name: Audit Logs
paths:
/api/v3/accounts/{account_id}/audit-logs/:
get:
operationId: ListRecentAuditLogEvents
description: 'Fetch paginated audit log events.
Note: This API is only available to enterprise customers.'
parameters:
- in: path
name: account_id
schema:
type: integer
format: int64
required: true
- in: query
name: include_related
schema:
type: string
description: Comma-separated list of related objects to include in the response.
tags:
- Audit Logs
security:
- BearerAuthentication: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/PublicAuditLogListEnveloped'
description: ''
summary: List recent audit log events
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: List Recent Audit Log Events
/api/v3/accounts/{account_id}/audit-logs/download/:
get:
operationId: GetRecentAuditLogEventsCSV
description: 'Generate audit log CSV
Note: This API is only available to enterprise customers.'
parameters:
- in: path
name: account_id
schema:
type: integer
format: int64
required: true
- in: query
name: include_related
schema:
type: string
description: Comma-separated list of related objects to include in the response.
tags:
- Audit Logs
security:
- BearerAuthentication: []
responses:
'200':
description: A CSV file
summary: Get recent audit log events CSV
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: Get Recent Audit Log Events CSV
/api/v3/accounts/{account_id}/audit-logs/export/:
get:
operationId: GetBulkAuditLogExportStatus
description: 'Check the status of a bulk export request.
Note: This API is only available to enterprise customers.'
parameters:
- in: path
name: account_id
schema:
type: integer
format: int64
required: true
- in: query
name: include_related
schema:
type: string
description: Comma-separated list of related objects to include in the response.
tags:
- Audit Logs
security:
- BearerAuthentication: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AuditLogBulkExportStatusResponseEnveloped'
description: ''
summary: Get bulk audit log export status
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: Get Bulk Audit Log Export Status
post:
operationId: SubmitBulkAuditLogExportRequest
description: 'Submit a bulk export request.
Note: This API is only available to enterprise customers.'
parameters:
- in: path
name: account_id
schema:
type: integer
format: int64
required: true
tags:
- Audit Logs
security:
- BearerAuthentication: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AuditLogStartBulkExportResponseEnveloped'
description: ''
summary: Submit bulk audit log export request
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: Submit Bulk Audit Log Export Request
/api/v3/accounts/{account_id}/audit-logs/export/{job_identifier}/download/:
get:
operationId: DownloadBulkAuditLogExport
description: 'Download a bulk export of audit log events.
Note: This API is only available to enterprise customers.'
parameters:
- in: path
name: account_id
schema:
type: integer
format: int64
required: true
- in: query
name: include_related
schema:
type: string
description: Comma-separated list of related objects to include in the response.
- in: path
name: job_identifier
schema:
type: string
required: true
tags:
- Audit Logs
security:
- BearerAuthentication: []
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AuditLogBulkExportDownloadResponseEnveloped'
description: ''
summary: Download bulk audit log export
x-summary-source: derived
x-operation-id-source: normalized
x-operation-id-original: Download Bulk Audit Log Export
components:
schemas:
PublicAuditLogListEnveloped:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/PublicAuditLogResponse'
extra:
$ref: '#/components/schemas/Extra'
status:
$ref: '#/components/schemas/ResponseStatus'
required:
- data
- extra
- status
ResponseStatus:
type: object
properties:
code:
type: integer
default: 200
description: HTTP status code
is_success:
type: boolean
description: Whether the request was successful or not
user_message:
type: string
description: End-user friendly success or error message
developer_message:
type: string
description: Developer friendly success or error message
required:
- developer_message
- is_success
- user_message
AuditLogStartBulkExportResponse:
type: object
properties:
job_id:
type: string
AuditLogBulkExportDownloadResponse:
type: object
properties:
download_url:
type: string
AuditLogBulkExportDownloadResponseEnveloped:
type: object
properties:
data:
$ref: '#/components/schemas/AuditLogBulkExportDownloadResponse'
status:
$ref: '#/components/schemas/ResponseStatus'
required:
- data
- status
AuditLogStartBulkExportResponseEnveloped:
type: object
properties:
data:
$ref: '#/components/schemas/AuditLogStartBulkExportResponse'
status:
$ref: '#/components/schemas/ResponseStatus'
required:
- data
- status
AuditLogBulkExportStatusResponseEnveloped:
type: object
properties:
data:
$ref: '#/components/schemas/AuditLogBulkExportStatusResponse'
status:
$ref: '#/components/schemas/ResponseStatus'
required:
- data
- status
CustomPagination:
type: object
properties:
count:
type: integer
description: Number of items in the current page
total_count:
type: integer
description: Total number of items
required:
- count
- total_count
PublicAuditLogResponse:
type: object
properties:
id:
type: string
account_id:
type: integer
format: int64
source:
type: string
service:
type: string
actor: {}
event_type:
type: string
event_label:
type: string
event_context: {}
created_at:
type: string
format: date-time
readOnly: true
required:
- created_at
AuditLogBulkExportStatusResponse:
type: object
properties:
is_running:
type: boolean
Extra:
type: object
properties:
filters:
type: object
additionalProperties: {}
description: Filters applied to the request
order_by:
type: string
description: Ordering applied to the request
pagination:
$ref: '#/components/schemas/CustomPagination'
required:
- filters
- order_by
- pagination
securitySchemes:
BearerAuthentication:
type: http
scheme: bearer
bearerFormat: Bearer