---
title: Logs
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

[Accounts](https://developers.cloudflare.com/api/typescript/resources/accounts)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Logs

#### LogsAudit

##### [Get account audit logs (Version 2)](https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/list)

client.accounts.logs.audit.list(AuditListParams { account\_id, before, since, 26 more } params, RequestOptionsoptions?): CursorPaginationAfter<[AuditListResponse](https://developers.cloudflare.com/api/typescript/resources/accounts#%28resource%29%20accounts.logs.audit%20%3E%20%28model%29%20audit%5Flist%5Fresponse%20%3E%20%28schema%29) { id, account, action, 4 more } \>

GET/accounts/{account\_id}/logs/audit

##### [Get resource change history from an account audit log entry (Version 2)](https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/history)

client.accounts.logs.audit.history(stringid, AuditHistoryParams { account\_id, action\_time, before, 4 more } params, RequestOptionsoptions?): [AuditHistoryResponse](https://developers.cloudflare.com/api/typescript/resources/accounts#%28resource%29%20accounts.logs.audit%20%3E%20%28model%29%20audit%5Fhistory%5Fresponse%20%3E%20%28schema%29) { id, account, action, 4 more } 

GET/accounts/{account\_id}/logs/audit/{id}/history

##### [List account audit log product categories (Version 2)](https://developers.cloudflare.com/api/typescript/resources/accounts/subresources/logs/subresources/audit/methods/product%5Fcategories)

client.accounts.logs.audit.productCategories(AuditProductCategoriesParams { account\_id } params, RequestOptionsoptions?): SinglePage<[AuditProductCategoriesResponse](https://developers.cloudflare.com/api/typescript/resources/accounts#%28resource%29%20accounts.logs.audit%20%3E%20%28model%29%20audit%5Fproduct%5Fcategories%5Fresponse%20%3E%20%28schema%29) { label, products, value } \>

GET/accounts/{account\_id}/logs/audit/product\_categories

##### ModelsExpand Collapse 

AuditListResponse { id, account, action, 4 more } 

id?: string

A unique identifier for the audit log entry.

maxLength32

account?: Account { id, name } 

Contains account related information.

id?: string

A unique identifier for the account.

name?: string

A string that identifies the account name.

action?: Action { description, result, time, type } 

Provides information about the action performed.

description?: string

A short description of the action performed.

result?: string

The result of the action, indicating success or failure.

time?: string

A timestamp indicating when the action was logged.

formatdate-time

type?: string

A short string that describes the action that was performed.

actor?: Actor { id, context, email, 4 more } 

Provides details about the actor who performed the action.

id?: string

The ID of the actor who performed the action. If a user performed the action, this will be their User ID.

context?: "api" | "api\_key" | "api\_token" | 3 more

The context in which the action was initiated.

* `api`: The action was performed through the API. The specific credential type was not recorded.
* `api_key`: The action was authenticated with a Cloudflare Global API Key.
* `api_token`: The action was authenticated with an API token.
* `dash`: The action was performed through the Cloudflare dashboard.
* `oauth`: The action was authenticated with an OAuth token.
* `origin_ca_key`: The action was authenticated with an Origin CA key.

One of the following:

"api"

"api\_key"

"api\_token"

"dash"

"oauth"

"origin\_ca\_key"

email?: string

The email of the actor who performed the action.

formatemail

ip\_address?: string

The IP address of the request that performed the action.

token\_id?: string

The API token ID when the actor context is an api\_token or oauth.

token\_name?: string

The API token name when the actor context is an api\_token or oauth.

type?: "account" | "cloudflare\_admin" | "delegated\_service" | 2 more

The type of actor.

One of the following:

"account"

"cloudflare\_admin"

"delegated\_service"

"system"

"user"

raw?: Raw { cf\_ray\_id, method, status\_code, 2 more } 

Provides raw information about the request and response.

cf\_ray\_id?: string

The Cloudflare Ray ID for the request.

method?: string

The HTTP method of the request.

status\_code?: number

The HTTP response status code returned by the API.

uri?: string

The URI of the request.

user\_agent?: string

The client’s user agent string sent with the request.

resource?: Resource { id, product, request, 3 more } 

Provides details about the affected resource.

id?: string

The unique identifier for the affected resource.

product?: string

The Cloudflare product associated with the resource.

request?: unknown

response?: unknown

scope?: unknown

The scope of the resource.

type?: string

The type of the resource.

zone?: Zone { id, name } 

Provides details about the zone affected by the action.

id?: string

A string that identifies the zone id.

name?: string

A string that identifies the zone name.

AuditHistoryResponse \= Array<AuditHistoryResponseItem\>

id?: string

A unique identifier for the audit log entry.

maxLength32

account?: Account { id, name } 

Contains account related information.

id?: string

A unique identifier for the account.

name?: string

A string that identifies the account name.

action?: Action { description, result, time, type } 

Provides information about the action performed.

description?: string

A short description of the action performed.

result?: string

The result of the action, indicating success or failure.

time?: string

A timestamp indicating when the action was logged.

formatdate-time

type?: string

A short string that describes the action that was performed.

actor?: Actor { id, context, email, 4 more } 

Provides details about the actor who performed the action.

id?: string

The ID of the actor who performed the action. If a user performed the action, this will be their User ID.

context?: "api" | "api\_key" | "api\_token" | 3 more

The context in which the action was initiated.

* `api`: The action was performed through the API. The specific credential type was not recorded.
* `api_key`: The action was authenticated with a Cloudflare Global API Key.
* `api_token`: The action was authenticated with an API token.
* `dash`: The action was performed through the Cloudflare dashboard.
* `oauth`: The action was authenticated with an OAuth token.
* `origin_ca_key`: The action was authenticated with an Origin CA key.

One of the following:

"api"

"api\_key"

"api\_token"

"dash"

"oauth"

"origin\_ca\_key"

email?: string

The email of the actor who performed the action.

formatemail

ip\_address?: string

The IP address of the request that performed the action.

token\_id?: string

The API token ID when the actor context is an api\_token or oauth.

token\_name?: string

The API token name when the actor context is an api\_token or oauth.

type?: "account" | "cloudflare\_admin" | "delegated\_service" | 2 more

The type of actor.

One of the following:

"account"

"cloudflare\_admin"

"delegated\_service"

"system"

"user"

raw?: Raw { cf\_ray\_id, method, status\_code, 2 more } 

Provides raw information about the request and response.

cf\_ray\_id?: string

The Cloudflare Ray ID for the request.

method?: string

The HTTP method of the request.

status\_code?: number

The HTTP response status code returned by the API.

uri?: string

The URI of the request.

user\_agent?: string

The client’s user agent string sent with the request.

resource?: Resource { id, product, request, 3 more } 

Provides details about the affected resource.

id?: string

The unique identifier for the affected resource.

product?: string

The Cloudflare product associated with the resource.

request?: unknown

response?: unknown

scope?: unknown

The scope of the resource.

type?: string

The type of the resource.

zone?: Zone { id, name } 

Provides details about the zone affected by the action.

id?: string

A string that identifies the zone id.

name?: string

A string that identifies the zone name.

AuditProductCategoriesResponse { label, products, value } 

A predefined product category and the resource products it expands to.

label?: string

A human-readable label for the product category.

products?: Array<Product\>

The resource products that the product category expands to.

label?: string

A human-readable label for the product.

value?: string

The resource\_product value that the product category expands to.

value?: string

The product category identifier used with the product\_category filter.