Skip to main content

audit_logs

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

Overview​

Nameaudit_logs
TypeResource
Idcloudflare.security_center.audit_logs

Fields​

The following fields are returned by SELECT queries:

The request was successful.

NameDatatypeDescription
idstring (uuid)UUIDv7 identifier for the audit log entry, time-ordered.
issue_idstringThe ID of the insight this audit log entry relates to.
zone_idinteger (int64)The zone ID associated with the insight. Only present for zone-level insights.
changed_atstring (date-time)The timestamp when the change occurred.
changed_bystringThe actor that made the change. 'system' for automated changes, or a user identifier. (example: system)
current_valuestringThe value of the field after the change. Null if the field was cleared.
field_changedstringThe field that was changed. (status, user_classification)
previous_valuestringThe value of the field before the change. Null if the field was not previously set.
rationalestringOptional rationale provided for the change.

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_account_issueselectaccount_id, issue_idper_page, cursor, field_changed, changed_by, since, before, orderLists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.
list_by_zone_issueselectzone_id, issue_idper_page, cursor, field_changed, changed_by, since, before, orderLists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.
list_by_accountselectaccount_idper_page, cursor, field_changed, changed_by, since, before, orderLists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.
list_by_zoneselectzone_idper_page, cursor, field_changed, changed_by, since, before, orderLists audit log entries for all Security Center insights in the account or zone, showing changes to insight status and classification.

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
account_idstringThe Cloudflare account ID.
issue_idstring
zone_idstringThe Cloudflare zone ID.
beforestring (date-time)Filter entries changed before this timestamp (RFC 3339).
changed_bystringFilter by the actor that made the change.
cursorstringOpaque cursor for pagination. Use the cursor value from result_info of the previous response.
field_changedstringFilter by the field that was changed.
orderstringSort order for results. Use 'asc' for oldest first or 'desc' for newest first.
per_pageintegerNumber of results per page.
sincestring (date-time)Filter entries changed at or after this timestamp (RFC 3339).

SELECT examples​

Lists audit log entries for a specific Security Center insight, showing changes to its status and classification over time.

SELECT
id,
issue_id,
zone_id,
changed_at,
changed_by,
current_value,
field_changed,
previous_value,
rationale
FROM cloudflare.security_center.audit_logs
WHERE account_id = '{{ account_id }}' -- required
AND issue_id = '{{ issue_id }}' -- required
AND per_page = '{{ per_page }}'
AND cursor = '{{ cursor }}'
AND field_changed = '{{ field_changed }}'
AND changed_by = '{{ changed_by }}'
AND since = '{{ since }}'
AND before = '{{ before }}'
AND order = '{{ order }}'
;