audit
Creates, updates, deletes, gets or lists an audit resource.
Overview
| Name | audit |
| Type | Resource |
| Id | cloudflare.organizations.audit |
Fields
The following fields are returned by SELECT queries:
- list
Get organization audit logs successful response
| Name | Datatype | Description |
|---|---|---|
id | string | A unique identifier for the audit log entry. (example: 023e105f4ecef8ad9ca31a8372d0c353) |
action | object | Provides information about the action performed. |
actor | object | Provides details about the actor who performed the action. |
organization | object | Contains organization related information. |
raw | object | Provides raw information about the request and response. |
resource | object | Provides details about the affected resource. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list | select | organization_id | action_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, cursor | Gets 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.
| Name | Datatype | Description |
|---|---|---|
organization_id | string | The organization ID. |
action_result | array | |
action_result.not | array | |
action_type | array | |
action_type.not | array | |
actor_context | array | |
actor_context.not | array | |
actor_email | array | |
actor_email.not | array | |
actor_id | array | |
actor_id.not | array | |
actor_ip_address | array | |
actor_ip_address.not | array | |
actor_token_id | array | |
actor_token_id.not | array | |
actor_token_name | array | |
actor_token_name.not | array | |
actor_type | array | |
actor_type.not | array | |
before | string (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. |
cursor | string | |
direction | string | |
id | array | |
id.not | array | |
limit | number | |
raw_cf_ray_id | array | |
raw_cf_ray_id.not | array | |
raw_method | array | |
raw_method.not | array | |
raw_status_code | array | |
raw_status_code.not | array | |
raw_uri | array | |
raw_uri.not | array | |
resource_id | array | |
resource_id.not | array | |
resource_product | array | |
resource_product.not | array | |
resource_scope | array | |
resource_scope.not | array | |
resource_type | array | |
resource_type.not | array | |
since | string (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
- list
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 }}'
;