From 28c06a7fd33c143e5da9b368b70262677d8c5fb4 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Tue, 16 Jul 2024 10:46:57 +0100 Subject: [PATCH] feat(api): add hash to url_scanner --- src/cloudflare/resources/url_scanner/url_scanner.py | 8 ++++++++ .../types/url_scanner/url_scanner_scan_params.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/cloudflare/resources/url_scanner/url_scanner.py b/src/cloudflare/resources/url_scanner/url_scanner.py index de67cb75970..4c7bf2e1059 100644 --- a/src/cloudflare/resources/url_scanner/url_scanner.py +++ b/src/cloudflare/resources/url_scanner/url_scanner.py @@ -57,6 +57,7 @@ def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -97,6 +98,8 @@ def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -146,6 +149,7 @@ def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, @@ -189,6 +193,7 @@ async def scan( asn: str | NotGiven = NOT_GIVEN, date_end: Union[str, datetime] | NotGiven = NOT_GIVEN, date_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + hash: str | NotGiven = NOT_GIVEN, hostname: str | NotGiven = NOT_GIVEN, ip: str | NotGiven = NOT_GIVEN, is_malicious: bool | NotGiven = NOT_GIVEN, @@ -229,6 +234,8 @@ async def scan( date_start: Filter scans requested after date (inclusive). + hash: Filter scans by hash of any html/js/css request made by the webpage. + hostname: Filter scans by hostname of _any_ request made by the webpage. ip: Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage. @@ -278,6 +285,7 @@ async def scan( "asn": asn, "date_end": date_end, "date_start": date_start, + "hash": hash, "hostname": hostname, "ip": ip, "is_malicious": is_malicious, diff --git a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py index 76879316d3e..faa55bf906b 100644 --- a/src/cloudflare/types/url_scanner/url_scanner_scan_params.py +++ b/src/cloudflare/types/url_scanner/url_scanner_scan_params.py @@ -27,6 +27,9 @@ class URLScannerScanParams(TypedDict, total=False): date_start: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """Filter scans requested after date (inclusive).""" + hash: str + """Filter scans by hash of any html/js/css request made by the webpage.""" + hostname: str """Filter scans by hostname of _any_ request made by the webpage."""