---
title: Logs
---

[Skip to content](#%5Ftop) 

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

[Organizations](https://developers.cloudflare.com/api/typescript/resources/organizations)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Logs

#### LogsAudit

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

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

GET/organizations/{organization\_id}/logs/audit

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

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

GET/organizations/{organization\_id}/logs/audit/{id}/history

##### ModelsExpand Collapse 

AuditListResponse { id, action, actor, 3 more } 

id?: string

A unique identifier for the audit log entry.

maxLength32

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?: "cloudflare\_admin" | "system" | "user"

The type of actor.

One of the following:

"cloudflare\_admin"

"system"

"user"

organization?: Organization { id } 

Contains organization related information.

id?: string

A unique identifier for the organization.

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.

AuditHistoryResponse \= Array<AuditHistoryResponseItem\>

id?: string

A unique identifier for the audit log entry.

maxLength32

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?: "cloudflare\_admin" | "system" | "user"

The type of actor.

One of the following:

"cloudflare\_admin"

"system"

"user"

organization?: Organization { id } 

Contains organization related information.

id?: string

A unique identifier for the organization.

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.