scans
Creates, updates, deletes, gets or lists a scans resource.
Overview
| Name | scans |
| Type | Resource |
| Id | cloudflare.security_center.scans |
Fields
The following fields are returned by SELECT queries:
- list_by_account
- list_by_zone
The request was successful.
| Name | Datatype | Description |
|---|---|---|
scan_id | string | An opaque identifier for the scan. (example: d5e94e48-504f-4a7f-a8c4-e0dc2e05e5f2) |
started_at | string (date-time) | The time at which the scan was started, in RFC 3339 format. (example: 2026-04-13T23:59:59Z) |
status | string | The current status of the scan. (in_progress, completed) |
The request was successful.
| Name | Datatype | Description |
|---|---|---|
scan_id | string | An opaque identifier for the scan. (example: d5e94e48-504f-4a7f-a8c4-e0dc2e05e5f2) |
started_at | string (date-time) | The time at which the scan was started, in RFC 3339 format. (example: 2026-04-13T23:59:59Z) |
status | string | The current status of the scan. (in_progress, completed) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_by_account | select | account_id | 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. | |
list_by_zone | select | zone_id | 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. | |
post_accounts_account_id_security_center_insights_scans | insert | account_id | 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. | |
post_zones_zone_id_security_center_insights_scans | insert | zone_id | 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. |
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 |
|---|---|---|
account_id | string | The Cloudflare account ID. |
zone_id | string | The Cloudflare zone ID. |
SELECT examples
- list_by_account
- list_by_zone
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
;
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 zone_id = '{{ zone_id }}' -- required
;
INSERT examples
- post_accounts_account_id_security_center_insights_scans
- post_zones_zone_id_security_center_insights_scans
- Manifest
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
;
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,
zone_id
)
SELECT
'{{ issue_type }}',
'{{ issue_class }}',
'{{ zone_id }}'
RETURNING
errors,
messages,
result,
success
;
# Description fields are for documentation purposes
- name: scans
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the scans resource.
- name: zone_id
value: "{{ zone_id }}"
description: Required parameter for the scans resource.
- name: issue_type
value: "{{ issue_type }}"
valid_values: ['compliance_violation', 'email_security', 'exposed_infrastructure', 'insecure_configuration', 'weak_authentication', 'configuration_suggestion']
- name: issue_class
value: "{{ issue_class }}"