Skip to content
Start here

Update a saved event query

PATCH/accounts/{account_id}/cloudforce-one/events/queries/{query_id}

Update an existing saved event query by its ID

Security

API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
Accepted Permissions (at least one required)
Cloudforce One Write
Path ParametersExpand Collapse
account_id: string

Account ID.

query_id: number

Event query ID

Body ParametersJSONExpand Collapse
alert_enabled: optional boolean

Enable alerts for this query

alert_rollup_enabled: optional boolean

Enable alert rollup for this query

name: optional string

Unique name for the saved query

query_json: optional string

JSON string containing the query parameters

rule_enabled: optional boolean

Enable rule for this query

rule_scope: optional string

Scope for the rule

ReturnsExpand Collapse
id: number

Unique identifier for the saved query

account_id: number

Account ID

alert_enabled: boolean

Whether alerts are enabled

alert_rollup_enabled: boolean

Whether alert rollup is enabled

created_at: string

Creation timestamp

name: string

Name of the saved query

query_json: string

JSON string containing the query parameters

rule_enabled: boolean

Whether rule is enabled

updated_at: string

Last update timestamp

user_email: string

Email of the user who created the query

custom_threat_feed_id: optional number

Intel Indicator Feed ID (numeric)

rule_list_id: optional string

WAF rules list ID for blocking

rule_scope: optional string

Scope for the rule

Update a saved event query

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/cloudforce-one/events/queries/$QUERY_ID \
    -X PATCH \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "id": 0,
  "account_id": 0,
  "alert_enabled": true,
  "alert_rollup_enabled": true,
  "created_at": "created_at",
  "name": "name",
  "query_json": "query_json",
  "rule_enabled": true,
  "updated_at": "updated_at",
  "user_email": "user_email",
  "custom_threat_feed_id": 0,
  "rule_list_id": "rule_list_id",
  "rule_scope": "rule_scope"
}
Returns Examples
{
  "id": 0,
  "account_id": 0,
  "alert_enabled": true,
  "alert_rollup_enabled": true,
  "created_at": "created_at",
  "name": "name",
  "query_json": "query_json",
  "rule_enabled": true,
  "updated_at": "updated_at",
  "user_email": "user_email",
  "custom_threat_feed_id": 0,
  "rule_list_id": "rule_list_id",
  "rule_scope": "rule_scope"
}