List group role assignments
List group role assignments
zones.groups.roles.list(strgroup_id, RoleListParams**kwargs) -> RoleListResponse
GET/zones/{zoneId}/groups/{groupId}/roles
Returns the roles assigned to the group. Members inherit these roles. Returns the shared role-assignment shape with principal_type set to group. Use cursor pagination via after/before; pass expand[]=total_count to include the matching row count. Pass filter[id] (repeatable, max 100) to restrict results to a known set of role assignments, mutually exclusive with after/before (returns 400 if combined). When filter[id] is set, limit is ignored and the response contains every requested assignment that exists on the group, in a single page. IDs not on the group are silently omitted.
Parameters
zone_id: str
group_id: str
after: Optional[str]
Cursor for forward pagination
minLength1
maxLength255
before: Optional[str]
Cursor for backward pagination
minLength1
maxLength255
limit: Optional[int]
Maximum number of items to return
minimum1
maximum100
Returns
List group role assignments
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
)
roles = client.zones.groups.roles.list(
group_id="groupId",
zone_id="zoneId",
)
print(roles.items){
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"principal_id": "principal_id",
"principal_type": "principal_type",
"role_id": "role_id",
"role_identifier": "role_identifier",
"role_owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"scope_id": "scope_id",
"scope_type": "scope_type"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}Returns Examples
{
"items": [
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"principal_id": "principal_id",
"principal_type": "principal_type",
"role_id": "role_id",
"role_identifier": "role_identifier",
"role_owner_type": "platform",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"scope_id": "scope_id",
"scope_type": "scope_type"
}
],
"pagination": {
"after_cursor": "x",
"before_cursor": "x",
"total_count": 0
}
}