Skip to main content

scans

Creates, updates, deletes, gets or lists a scans resource.

Overview

Namescans
TypeResource
Idcloudflare.security_center.scans

Fields

The following fields are returned by SELECT queries:

The request was successful.

NameDatatypeDescription
scan_idstringAn opaque identifier for the scan. (example: d5e94e48-504f-4a7f-a8c4-e0dc2e05e5f2)
started_atstring (date-time)The time at which the scan was started, in RFC 3339 format. (example: 2026-04-13T23:59:59Z)
statusstringThe current status of the scan. (in_progress, completed)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_by_accountselectaccount_idReturns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans.
list_by_zoneselectzone_idReturns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans.
post_accounts_account_id_security_center_insights_scansinsertaccount_idInitiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.
post_zones_zone_id_security_center_insights_scansinsertzone_idInitiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.

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.
zone_idstringThe Cloudflare zone ID.

SELECT examples

Returns the most recent on-demand scans for the account or zone, up to a maximum of 5. Each scan includes its ID, start time, and current status. This includes both account or zone-wide and zone-scoped scans.

SELECT
scan_id,
started_at,
status
FROM cloudflare.security_center.scans
WHERE account_id = '{{ account_id }}' -- required
;

INSERT examples

Initiates an on-demand security scan for the entire account or zone, scanning all zones associated with the account or zone. Rate limited to 5 scans per account or zone per 24-hour window.

INSERT INTO cloudflare.security_center.scans (
issue_type,
issue_class,
account_id
)
SELECT
'{{ issue_type }}',
'{{ issue_class }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;