---
title: Rules
---

[Skip to content](#%5Ftop) 

[API Reference](https://developers.cloudflare.com/api/typescript)

[RUM](https://developers.cloudflare.com/api/typescript/resources/rum)

Copy Markdown

Open in **Claude**

Open in **ChatGPT**

Open in **Cursor**

---

**Copy Markdown**

**View as Markdown**

# Rules

##### [List rules in Web Analytics ruleset](https://developers.cloudflare.com/api/typescript/resources/rum/subresources/rules/methods/list)

client.rum.rules.list(stringrulesetID, RuleListParams { account\_id } params, RequestOptionsoptions?): [RuleListResponse](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rule%5Flist%5Fresponse%20%3E%20%28schema%29) { rules, ruleset } 

GET/accounts/{account\_id}/rum/v2/{ruleset\_id}/rules

##### [Create a Web Analytics rule](https://developers.cloudflare.com/api/typescript/resources/rum/subresources/rules/methods/create)

client.rum.rules.create(stringrulesetID, RuleCreateParams { account\_id, host, inclusive, 2 more } params, RequestOptionsoptions?): [RUMRule](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rum%5Frule%20%3E%20%28schema%29) { id, created, host, 4 more } 

POST/accounts/{account\_id}/rum/v2/{ruleset\_id}/rule

##### [Update a Web Analytics rule](https://developers.cloudflare.com/api/typescript/resources/rum/subresources/rules/methods/update)

client.rum.rules.update(stringruleID, RuleUpdateParams { account\_id, ruleset\_id, host, 3 more } params, RequestOptionsoptions?): [RUMRule](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rum%5Frule%20%3E%20%28schema%29) { id, created, host, 4 more } 

PUT/accounts/{account\_id}/rum/v2/{ruleset\_id}/rule/{rule\_id}

##### [Delete a Web Analytics rule](https://developers.cloudflare.com/api/typescript/resources/rum/subresources/rules/methods/delete)

client.rum.rules.delete(stringruleID, RuleDeleteParams { account\_id, ruleset\_id } params, RequestOptionsoptions?): [RuleDeleteResponse](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rule%5Fdelete%5Fresponse%20%3E%20%28schema%29) { id } 

DELETE/accounts/{account\_id}/rum/v2/{ruleset\_id}/rule/{rule\_id}

##### [Update Web Analytics rules](https://developers.cloudflare.com/api/typescript/resources/rum/subresources/rules/methods/bulk%5Fcreate)

client.rum.rules.bulkCreate(stringrulesetID, RuleBulkCreateParams { account\_id, delete\_rules, rules } params, RequestOptionsoptions?): [RuleBulkCreateResponse](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rule%5Fbulk%5Fcreate%5Fresponse%20%3E%20%28schema%29) { rules, ruleset } 

POST/accounts/{account\_id}/rum/v2/{ruleset\_id}/rules

##### ModelsExpand Collapse 

RUMRule { id, created, host, 4 more } 

id?: string

The Web Analytics rule identifier.

created?: string

formatdate-time

host?: string

The hostname the rule will be applied to.

inclusive?: boolean

Whether the rule includes or excludes traffic from being measured.

is\_paused?: boolean

Whether the rule is paused or not.

paths?: Array<string\>

The paths the rule will be applied to.

priority?: number

RuleListResponse { rules, ruleset } 

rules?: Array<[RUMRule](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rum%5Frule%20%3E%20%28schema%29) { id, created, host, 4 more } \>

A list of rules.

id?: string

The Web Analytics rule identifier.

created?: string

formatdate-time

host?: string

The hostname the rule will be applied to.

inclusive?: boolean

Whether the rule includes or excludes traffic from being measured.

is\_paused?: boolean

Whether the rule is paused or not.

paths?: Array<string\>

The paths the rule will be applied to.

priority?: number

ruleset?: Ruleset { id, enabled, zone\_name, zone\_tag } 

id?: string

The Web Analytics ruleset identifier.

enabled?: boolean

Whether the ruleset is enabled.

zone\_name?: string

zone\_tag?: string

The zone identifier.

RuleDeleteResponse { id } 

id?: string

The Web Analytics rule identifier.

RuleBulkCreateResponse { rules, ruleset } 

rules?: Array<[RUMRule](https://developers.cloudflare.com/api/typescript/resources/rum#%28resource%29%20rum.rules%20%3E%20%28model%29%20rum%5Frule%20%3E%20%28schema%29) { id, created, host, 4 more } \>

A list of rules.

id?: string

The Web Analytics rule identifier.

created?: string

formatdate-time

host?: string

The hostname the rule will be applied to.

inclusive?: boolean

Whether the rule includes or excludes traffic from being measured.

is\_paused?: boolean

Whether the rule is paused or not.

paths?: Array<string\>

The paths the rule will be applied to.

priority?: number

ruleset?: Ruleset { id, enabled, zone\_name, zone\_tag } 

id?: string

The Web Analytics ruleset identifier.

enabled?: boolean

Whether the ruleset is enabled.

zone\_name?: string

zone\_tag?: string

The zone identifier.