Skip to content
Start here

Update a saved event query

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

Updates the given fields of a saved event query.

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
Deprecatedalert_enabled: optional boolean

Deprecated and ignored: saved-query alerting and rules were removed.

Deprecatedalert_rollup_enabled: optional boolean

Deprecated and ignored: saved-query alerting and rules were removed.

name: optional string

Unique name for the saved query

query_json: optional string

JSON string containing the query parameters

Deprecatedrule_enabled: optional boolean

Deprecated and ignored: saved-query alerting and rules were removed.

Deprecatedrule_scope: optional string

Deprecated and ignored: saved-query alerting and rules were removed.

ReturnsExpand Collapse
id: number

Unique identifier for the saved query

account_id: number

Account ID

Deprecatedalert_enabled: boolean

Deprecated: saved-query alerting and rules were removed. Always false.

Deprecatedalert_rollup_enabled: boolean

Deprecated: saved-query alerting and rules were removed. Always false.

created_at: string

Creation timestamp

name: string

Name of the saved query

query_json: string

JSON string containing the query parameters

Deprecatedrule_enabled: boolean

Deprecated: saved-query alerting and rules were removed. Always false.

updated_at: string

Last update timestamp

user_email: string

Email of the user who created the query

Deprecatedcustom_threat_feed_id: optional number

Deprecated: saved-query alerting and rules were removed. Always null.

Deprecatedrule_list_id: optional string

Deprecated: saved-query alerting and rules were removed. Always null.

Deprecatedrule_scope: optional string

Deprecated: saved-query alerting and rules were removed. Always null.

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"
}