Skip to main content

scan

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

Overview

Namescan
TypeResource
Idcloudflare.url_scanner.scan

Fields

The following fields are returned by SELECT queries:

Scan has finished. It may or may not have been successful.

NameDatatypeDescription
scanobject

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectscan_id, account_idfullGet URL scan by uuid
listselectaccount_idscan_id, limit, next_cursor, date_start, date_end, url, hostname, path, ip, hash, page_url, page_hostname, page_path, page_asn, page_ip, account_scans, is_maliciousSearch scans by date and webpages' requests, including full URL (after redirects), hostname, and path.
A successful scan will appear in search results a few minutes after finishing but may take much longer if the system in under load. By default, only successfully completed scans will appear in search results, unless searching by scanId. Please take into account that older scans may be removed from the search index at an unspecified time.
urlscanner_create_scaninsertaccount_id, urlSubmit a URL to scan. You can also set some options, like the visibility level and custom headers. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.

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.
scan_idstring (uuid)Scan UUID.
account_scansbooleanReturn only scans created by account.
date_endstring (date-time)Filter scans requested before date (inclusive).
date_startstring (date-time)Filter scans requested after date (inclusive).
fullbooleanWhether to return full report (scan summary and network log).
hashstringFilter scans by hash of any html/js/css request made by the webpage.
hostnamestringFilter scans by hostname of any request made by the webpage.
ipstringFilter scans by IP address (IPv4 or IPv6) of any request made by the webpage.
is_maliciousbooleanFilter scans by malicious verdict.
limitintegerLimit the number of objects in the response.
next_cursorstringPagination cursor to get the next set of results.
page_asnstringFilter scans by main page Autonomous System Number (ASN).
page_hostnamestringFilter scans by main page hostname (domain of effective URL).
page_ipstringFilter scans by main page IP address (IPv4 or IPv6).
page_pathstringFilter scans by exact match of effective URL path (also supports suffix search).
page_urlstringFilter scans by submitted or scanned URL
pathstringFilter scans by url path of any request made by the webpage.
scan_idstring (uuid)Scan UUID.
urlstringFilter scans by URL of any request made by the webpage

SELECT examples

Get URL scan by uuid

SELECT
scan
FROM cloudflare.url_scanner.scan
WHERE scan_id = '{{ scan_id }}' -- required
AND account_id = '{{ account_id }}' -- required
AND full = '{{ full }}'
;

INSERT examples

Submit a URL to scan. You can also set some options, like the visibility level and custom headers. Check limits at https://developers.cloudflare.com/security-center/investigate/scan-limits/.

INSERT INTO cloudflare.url_scanner.scan (
country,
customHeaders,
screenshotsResolutions,
url,
visibility,
account_id
)
SELECT
'{{ country }}',
'{{ customHeaders }}',
'{{ screenshotsResolutions }}',
'{{ url }}' /* required */,
'{{ visibility }}',
'{{ account_id }}'
RETURNING
errors,
messages,
result,
success
;