---
title: Role Details
---

[Skip to content](#_top)

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

[Accounts](https://developers.cloudflare.com/api/python/resources/accounts)

[Roles](https://developers.cloudflare.com/api/python/resources/accounts/subresources/roles)

Copy Markdown

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

---

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

# Role Details

Deprecated: Use /accounts/{account\_id}/iam/permission\_groups/{permission\_group\_id} instead.

accounts.roles.get(strrole\_id, RoleGetParams\*\*kwargs) -> [Role](<https://developers.cloudflare.com/api/python/resources/$shared#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)>)

GET/accounts/{account\_id}/roles/{role\_id}

Get information about a specific role for an account.

##### Security

API Email + API Key

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

**Example:**`X-Auth-Email: user@example.com`

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

**Example:**`X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194`

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

`SCIM Provisioning``Account Settings Write``Account Settings Read`

##### ParametersExpand Collapse

account\_id: str

Account identifier tag.

maxLength32

minLength32

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20account_id%20%3E%20(schema)>)

role\_id: str

Role identifier tag.

maxLength32

[Link to this property](<#(resource)%20accounts.roles%20%3E%20(method)%20get%20%3E%20(params)%20default%20%3E%20(param)%20role_id%20%3E%20(schema)>)

##### ReturnsExpand Collapse

<details>

<summary>

class Role: …

</summary>

id: str

Role identifier tag.

maxLength32

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20id">Link to this property</a>

description: str

Description of role’s permissions.

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20description">Link to this property</a>

name: str

Role name.

maxLength120

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20name">Link to this property</a>

<details>

<summary>

permissions: Permissions

</summary>

<details>

<summary>

analytics: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20analytics">Link to this property</a>

<details>

<summary>

billing: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20billing">Link to this property</a>

<details>

<summary>

cache\_purge: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20cache_purge">Link to this property</a>

<details>

<summary>

dns: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns">Link to this property</a>

<details>

<summary>

dns\_records: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20dns_records">Link to this property</a>

<details>

<summary>

lb: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20lb">Link to this property</a>

<details>

<summary>

logs: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20logs">Link to this property</a>

<details>

<summary>

organization: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20organization">Link to this property</a>

<details>

<summary>

ssl: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20ssl">Link to this property</a>

<details>

<summary>

waf: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20waf">Link to this property</a>

<details>

<summary>

zone\_settings: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zone_settings">Link to this property</a>

<details>

<summary>

zones: Optional\[PermissionGrant]

</summary>

read: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20read">Link to this property</a>

write: Optional\[bool]

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones%20%2B%20(resource)%20%24shared%20%3E%20(model)%20permission_grant%20%3E%20(schema)%20%3E%20(property)%20write">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions%20%3E%20(property)%20zones">Link to this property</a>

</details>

<a href="#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)%20%3E%20(property)%20permissions">Link to this property</a>

</details>

[Link to this property](<#(resource)%20%24shared%20%3E%20(model)%20role%20%3E%20(schema)>)

### Role Details

Python

HTTPTypeScriptPythonGoTerraform

```
import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_email=os.environ.get("CLOUDFLARE_EMAIL"),  # This is the default and can be omitted
    api_key=os.environ.get("CLOUDFLARE_API_KEY"),  # This is the default and can be omitted
)
role = client.accounts.roles.get(
    role_id="3536bcfad5faccb999b47003c79917fb",
    account_id="023e105f4ecef8ad9ca31a8372d0c353",
)
print(role.id)
```

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "3536bcfad5faccb999b47003c79917fb",
    "description": "Administrative access to the entire Account",
    "name": "Account Administrator",
    "permissions": {
      "analytics": {
        "read": true,
        "write": false
      },
      "billing": {
        "read": true,
        "write": false
      },
      "cache_purge": {
        "read": true,
        "write": false
      },
      "dns": {
        "read": true,
        "write": false
      },
      "dns_records": {
        "read": true,
        "write": false
      },
      "lb": {
        "read": true,
        "write": false
      },
      "logs": {
        "read": true,
        "write": false
      },
      "organization": {
        "read": true,
        "write": false
      },
      "ssl": {
        "read": true,
        "write": false
      },
      "waf": {
        "read": true,
        "write": false
      },
      "zone_settings": {
        "read": true,
        "write": false
      },
      "zones": {
        "read": true,
        "write": true
      }
    }
  }
}
```

##### Returns Examples

200 example

```
{
  "errors": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    {
      "code": 1000,
      "message": "message",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "success": true,
  "result": {
    "id": "3536bcfad5faccb999b47003c79917fb",
    "description": "Administrative access to the entire Account",
    "name": "Account Administrator",
    "permissions": {
      "analytics": {
        "read": true,
        "write": false
      },
      "billing": {
        "read": true,
        "write": false
      },
      "cache_purge": {
        "read": true,
        "write": false
      },
      "dns": {
        "read": true,
        "write": false
      },
      "dns_records": {
        "read": true,
        "write": false
      },
      "lb": {
        "read": true,
        "write": false
      },
      "logs": {
        "read": true,
        "write": false
      },
      "organization": {
        "read": true,
        "write": false
      },
      "ssl": {
        "read": true,
        "write": false
      },
      "waf": {
        "read": true,
        "write": false
      },
      "zone_settings": {
        "read": true,
        "write": false
      },
      "zones": {
        "read": true,
        "write": true
      }
    }
  }
}
```