Skip to main content

feedback

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

Overview​

Namefeedback
TypeResource
Idcloudflare.bot_management.feedback

Fields​

The following fields are returned by SELECT queries:

List of feedback reports

NameDatatypeDescription
created_atstring (date-time)
descriptionstring
expressionstringWirefilter expression describing the traffic being reported.
first_request_seen_atstring (date-time)
last_request_seen_atstring (date-time)
requestsinteger (int64)
requests_by_attributeobjectTop attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents.
requests_by_scoreobjectMap of bot scores (1-99) to request counts. Sum must equal requests.
requests_by_score_srcobjectMap of score source to request counts. Sum must equal requests.
subtypestring
typestringType of feedback report. (false_positive, false_negative) (example: false_positive)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
listselectzone_idReturns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.
bot_management_zone_feedback_createinsertzone_id, type, description, expression, first_request_seen_at, last_request_seen_at, requests, requests_by_score, requests_by_score_src, requests_by_attributeSubmit a feedback report for the specified zone. Use type to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use expression as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.

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

SELECT examples​

Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.

SELECT
created_at,
description,
expression,
first_request_seen_at,
last_request_seen_at,
requests,
requests_by_attribute,
requests_by_score,
requests_by_score_src,
subtype,
type
FROM cloudflare.bot_management.feedback
WHERE zone_id = '{{ zone_id }}' -- required
;

INSERT examples​

Submit a feedback report for the specified zone. Use type to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use expression as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.

INSERT INTO cloudflare.bot_management.feedback (
description,
expression,
first_request_seen_at,
last_request_seen_at,
requests,
requests_by_attribute,
requests_by_score,
requests_by_score_src,
subtype,
type,
zone_id
)
SELECT
'{{ description }}' /* required */,
'{{ expression }}' /* required */,
'{{ first_request_seen_at }}' /* required */,
'{{ last_request_seen_at }}' /* required */,
{{ requests }} /* required */,
'{{ requests_by_attribute }}' /* required */,
'{{ requests_by_score }}' /* required */,
'{{ requests_by_score_src }}' /* required */,
'{{ subtype }}',
'{{ type }}' /* required */,
'{{ zone_id }}'
;