Skip to main content

audit

Creates, updates, deletes, gets or lists an audit resource.

Overview

Nameaudit
TypeResource
Idcloudflare.organizations.audit

Fields

The following fields are returned by SELECT queries:

Get organization audit logs successful response

NameDatatypeDescription
idstringA unique identifier for the audit log entry. (example: 023e105f4ecef8ad9ca31a8372d0c353)
actionobjectProvides information about the action performed.
actorobjectProvides details about the actor who performed the action.
organizationobjectContains organization related information.
rawobjectProvides raw information about the request and response.
resourceobjectProvides details about the affected resource.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectorganization_idaction_result, action_type, actor_context, actor_email, actor_id, actor_ip_address, actor_token_id, actor_token_name, actor_type, id, raw_cf_ray_id, raw_method, raw_status_code, raw_uri, resource_id, resource_product, resource_type, resource_scope, action_result.not, action_type.not, actor_context.not, actor_email.not, actor_id.not, actor_ip_address.not, actor_token_id.not, actor_token_name.not, actor_type.not, id.not, raw_cf_ray_id.not, raw_method.not, raw_status_code.not, raw_uri.not, resource_id.not, resource_product.not, resource_type.not, resource_scope.not, since, before, direction, limit, cursorGets a list of audit logs for an organization.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
organization_idstringThe organization ID.
action_resultarray
action_result.notarray
action_typearray
action_type.notarray
actor_contextarray
actor_context.notarray
actor_emailarray
actor_email.notarray
actor_idarray
actor_id.notarray
actor_ip_addressarray
actor_ip_address.notarray
actor_token_idarray
actor_token_id.notarray
actor_token_namearray
actor_token_name.notarray
actor_typearray
actor_type.notarray
beforestring (date)Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.
cursorstring
directionstring
idarray
id.notarray
limitnumber
raw_cf_ray_idarray
raw_cf_ray_id.notarray
raw_methodarray
raw_method.notarray
raw_status_codearray
raw_status_code.notarray
raw_uriarray
raw_uri.notarray
resource_idarray
resource_id.notarray
resource_productarray
resource_product.notarray
resource_scopearray
resource_scope.notarray
resource_typearray
resource_type.notarray
sincestring (date)Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.

SELECT examples

Gets a list of audit logs for an organization.

SELECT
id,
action,
actor,
organization,
raw,
resource
FROM cloudflare.organizations.audit
WHERE organization_id = '{{ organization_id }}' -- required
AND action_result = '{{ action_result }}'
AND action_type = '{{ action_type }}'
AND actor_context = '{{ actor_context }}'
AND actor_email = '{{ actor_email }}'
AND actor_id = '{{ actor_id }}'
AND actor_ip_address = '{{ actor_ip_address }}'
AND actor_token_id = '{{ actor_token_id }}'
AND actor_token_name = '{{ actor_token_name }}'
AND actor_type = '{{ actor_type }}'
AND id = '{{ id }}'
AND raw_cf_ray_id = '{{ raw_cf_ray_id }}'
AND raw_method = '{{ raw_method }}'
AND raw_status_code = '{{ raw_status_code }}'
AND raw_uri = '{{ raw_uri }}'
AND resource_id = '{{ resource_id }}'
AND resource_product = '{{ resource_product }}'
AND resource_type = '{{ resource_type }}'
AND resource_scope = '{{ resource_scope }}'
AND action_result.not = '{{ action_result.not }}'
AND action_type.not = '{{ action_type.not }}'
AND actor_context.not = '{{ actor_context.not }}'
AND actor_email.not = '{{ actor_email.not }}'
AND actor_id.not = '{{ actor_id.not }}'
AND actor_ip_address.not = '{{ actor_ip_address.not }}'
AND actor_token_id.not = '{{ actor_token_id.not }}'
AND actor_token_name.not = '{{ actor_token_name.not }}'
AND actor_type.not = '{{ actor_type.not }}'
AND id.not = '{{ id.not }}'
AND raw_cf_ray_id.not = '{{ raw_cf_ray_id.not }}'
AND raw_method.not = '{{ raw_method.not }}'
AND raw_status_code.not = '{{ raw_status_code.not }}'
AND raw_uri.not = '{{ raw_uri.not }}'
AND resource_id.not = '{{ resource_id.not }}'
AND resource_product.not = '{{ resource_product.not }}'
AND resource_type.not = '{{ resource_type.not }}'
AND resource_scope.not = '{{ resource_scope.not }}'
AND since = '{{ since }}'
AND before = '{{ before }}'
AND direction = '{{ direction }}'
AND limit = '{{ limit }}'
AND cursor = '{{ cursor }}'
;