## Retrieve

`zones.roles.retrieve(strrole_id, RoleRetrieveParams**kwargs)  -> Role`

**get** `/zones/{zoneId}/roles/{roleId}`

Returns details of a specific role by ID

### Parameters

- `zone_id: str`

- `role_id: str`

### Returns

- `class Role: …`

  A role that can be assigned to users within a zone.

  - `id: str`

    Unique identifier of the role

  - `created_at: datetime`

    Entity creation timestamp

  - `identifier: str`

    Role identifier: a lowercase slug (letters and digits separated by single hyphens or underscores), unique per owner type within a zone. Role identifiers surface in policy evaluation, so the slug restriction keeps them unambiguous in policy text.

  - `owner_type: Literal["platform", "customer"]`

    Who owns this role. Platform-owned roles are managed by Keycard and cannot be modified or deleted via the API; customer-owned roles are user-created.

    - `"platform"`

    - `"customer"`

  - `updated_at: datetime`

    Entity update timestamp

  - `zone_id: str`

    Zone this role belongs to

  - `description: Optional[str]`

    Human-readable description

### Example

```python
import os
from keycardai_api import KeycardAPI

client = KeycardAPI(
    api_key=os.environ.get("KEYCARD_API_API_KEY"),  # This is the default and can be omitted
)
role = client.zones.roles.retrieve(
    role_id="roleId",
    zone_id="zoneId",
)
print(role.id)
```
