---
title: List an account or zone ruleset's versions
---

[Skip to content](#_top)

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

[Rulesets](https://developers.cloudflare.com/api/resources/rulesets)

[Versions](https://developers.cloudflare.com/api/resources/rulesets/subresources/versions)

Copy Markdown

Open in **Claude**Open in **ChatGPT**Open in **Cursor**

---

**Copy Markdown****View as Markdown**

# List an account or zone ruleset's versions

GET/{accounts\_or\_zones}/{account\_or\_zone\_id}/rulesets/{ruleset\_id}/versions

Fetches the versions of an account or zone ruleset.

##### Security

<details>

<summary>API Token</summary>



The preferred authorization scheme for interacting with the Cloudflare API. <a href="https://developers.cloudflare.com/fundamentals/api/get-started/create-token/">Create a token</a>.

**Example:**<code>Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY</code>

</details>

<details>

<summary>API Email + API Key</summary>



The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

**Example:**<code>X-Auth-Email: user@example.com</code>

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

**Example:**<code>X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194</code>

</details>

##### Accepted Permissions (at least one required)

`Mass URL Redirects Write``Mass URL Redirects Read``Magic Firewall Write``Magic Firewall Read``L4 DDoS Managed Ruleset Write``L4 DDoS Managed Ruleset Read``Transform Rules Write``Transform Rules Read``Select Configuration Write``Select Configuration Read``Account WAF Write``Account WAF Read``Account Rulesets Read``Account Rulesets Write``Logs Write``Logs Read`

##### P ath ParametersExpand Collapse

ruleset\_id: string

The unique ID of the ruleset.

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20ruleset_id%20%3E%20(schema)>)

account\_id: optional string

The Account ID to use for this endpoint. Mutually exclusive with the Zone ID.

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

zone\_id: optional string

The Zone ID to use for this endpoint. Mutually exclusive with the Account ID.

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(params)%20default%20%3E%20(param)%20zone_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

errors: array of object {message, code, source }

A list of error messages.

</summary>

message: string

A text description of this message.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

code: optional number

A unique code for this message.

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

The source of this message.

</summary>

pointer: string

A JSON pointer to the field that is the source of the message.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20errors>)

<details>

<summary>

messages: array of object {message, code, source }

A list of warning messages.

</summary>

message: string

A text description of this message.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20message">Link to this property</a>

code: optional number

A unique code for this message.

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20code">Link to this property</a>

<details>

<summary>

source: optional object {pointer }

The source of this message.

</summary>

pointer: string

A JSON pointer to the field that is the source of the message.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source%20%3E%20(property)%20pointer">Link to this property</a>

</details>

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages%20%3E%20(items)%20%3E%20(property)%20source">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20messages>)

<details>

<summary>

result: array of object {id, kind, last\_updated, 4 more }

A list of rulesets. The returned information will not include the rules in each ruleset.

</summary>

id: string

The unique ID of the ruleset.

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

<details>

<summary>

kind: <a href="https://developers.cloudflare.com/api/resources/rulesets#(resource)%20rulesets%20%3E%20(model)%20kind%20%3E%20(schema)">Kind</a>

The kind of the ruleset.

</summary>

One of the following:

"managed"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%2B%20(resource)%20rulesets%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"custom"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%2B%20(resource)%20rulesets%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"root"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%2B%20(resource)%20rulesets%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"zone"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20kind%20%2B%20(resource)%20rulesets%20%3E%20(model)%20kind%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

</details>

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20kind">Link to this property</a>

last\_updated: string

The timestamp of when the ruleset was last modified.

formatdate-time

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20last_updated">Link to this property</a>

name: string

The human-readable name of the ruleset.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

phase: <a href="https://developers.cloudflare.com/api/resources/rulesets#(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)">Phase</a>

The phase of the ruleset.

</summary>

One of the following:

"ddos\_l4"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%200">Link to this property</a>

"ddos\_l7"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%201">Link to this property</a>

"http\_config\_settings"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%202">Link to this property</a>

"http\_custom\_errors"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%203">Link to this property</a>

"http\_log\_custom\_fields"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%204">Link to this property</a>

"http\_ratelimit"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%205">Link to this property</a>

"http\_request\_cache\_settings"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%206">Link to this property</a>

"http\_request\_dynamic\_redirect"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%207">Link to this property</a>

"http\_request\_firewall\_custom"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%208">Link to this property</a>

"http\_request\_firewall\_managed"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%209">Link to this property</a>

"http\_request\_late\_transform"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2010">Link to this property</a>

"http\_request\_origin"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2011">Link to this property</a>

"http\_request\_redirect"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2012">Link to this property</a>

"http\_request\_sanitize"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2013">Link to this property</a>

"http\_request\_sbfm"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2014">Link to this property</a>

"http\_request\_transform"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2015">Link to this property</a>

"http\_response\_cache\_settings"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2016">Link to this property</a>

"http\_response\_compression"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2017">Link to this property</a>

"http\_response\_firewall\_managed"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2018">Link to this property</a>

"http\_response\_headers\_transform"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2019">Link to this property</a>

"magic\_transit"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2020">Link to this property</a>

"magic\_transit\_ids\_managed"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2021">Link to this property</a>

"magic\_transit\_managed"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2022">Link to this property</a>

"magic\_transit\_ratelimit"

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase%20%2B%20(resource)%20rulesets%20%3E%20(model)%20phase%20%3E%20(schema)%20%3E%20(member)%2023">Link to this property</a>

</details>

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20phase">Link to this property</a>

version: string

The version of the ruleset.

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20version">Link to this property</a>

description: optional string

An informative description of the ruleset.

<a href="#(resource)%20rulesets.versions%20%3E%20(model)%20version_list_response%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result>)

success: true

Whether the API call was successful.

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20success>)

<details>

<summary>

result\_info: optional object {cursors }

Information to navigate the results.

</summary>

<details>

<summary>

cursors: optional object {after }

The set of cursors.

</summary>

after: string

The cursor to use for the next page.

minLength1

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20cursors%20%3E%20(property)%20after">Link to this property</a>

</details>

<a href="#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info%20%3E%20(property)%20cursors">Link to this property</a>

</details>

[Link to this property](<#(resource)%20rulesets.versions%20%3E%20(method)%20list%20%3E%20(network%20schema)%20%3E%20(property)%20result_info>)

### List an account or zone ruleset's versions

HTTP

HTTPTypeScriptPythonGoTerraform

```
curl https://api.cloudflare.com/client/v4/$ACCOUNTS_OR_ZONES/$ACCOUNT_OR_ZONE_ID/rulesets/$RULESET_ID/versions \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
```

200 example

```
{
  "errors": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "messages": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "result": [
    {
      "id": "2f2feab2026849078ba485f918791bdc",
      "kind": "root",
      "last_updated": "2000-01-01T00:00:00Z",
      "name": "My ruleset",
      "phase": "http_request_firewall_custom",
      "version": "1",
      "description": "A description for my ruleset."
    }
  ],
  "success": true,
  "result_info": {
    "cursors": {
      "after": "dGhpc2lzYW5leGFtcGxlCg"
    }
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "messages": [
    {
      "message": "something bad happened",
      "code": 10000,
      "source": {
        "pointer": "/rules/0/action"
      }
    }
  ],
  "result": [
    {
      "id": "2f2feab2026849078ba485f918791bdc",
      "kind": "root",
      "last_updated": "2000-01-01T00:00:00Z",
      "name": "My ruleset",
      "phase": "http_request_firewall_custom",
      "version": "1",
      "description": "A description for my ruleset."
    }
  ],
  "success": true,
  "result_info": {
    "cursors": {
      "after": "dGhpc2lzYW5leGFtcGxlCg"
    }
  }
}
```