Skip to content
API Reference

List organization users in a zone

zones.members.list(strzone_id, MemberListParams**kwargs) -> MemberListResponse
GET/zones/{zoneId}/members

Lists all organization users in a zone with their roles and metadata. Supports cursor-based pagination.

ParametersExpand Collapse
zone_id: str
after: Optional[str]

Cursor for forward pagination

before: Optional[str]

Cursor for backward pagination

expand: Optional[Union[Literal["total_count"], List[Literal["total_count"]]]]
Accepts one of the following:
Literal["total_count"]
List[Literal["total_count"]]
limit: Optional[int]

Maximum number of members to return

minimum1
maximum100
role: Optional[Literal["zone_manager", "zone_viewer"]]

Filter members by role

Accepts one of the following:
"zone_manager"
"zone_viewer"
ReturnsExpand Collapse
class MemberListResponse:
items: List[ZoneMember]
id: str

Unique identifier of the zone member

created_at: datetime

Entity creation timestamp

formatdate-time
organization_id: str

Organization ID that owns the zone

organization_user_id: str

Organization user ID of the zone member

role: ZoneRole

Zone role type. zone_manager has full management access, zone_viewer has read-only access.

Accepts one of the following:
"zone_manager"
"zone_viewer"
updated_at: datetime

Entity update timestamp

formatdate-time
zone_id: str

Zone ID the organization user is a member of

Pagination information

has_next_page: bool

Whether there are more items after the current page

has_previous_page: bool

Whether there are items before the current page

end_cursor: Optional[str]

Cursor pointing to the last item in the current page

start_cursor: Optional[str]

Cursor pointing to the first item in the current page

List organization users in a zone

from keycardai_api import KeycardAPI

client = KeycardAPI()
members = client.zones.members.list(
    zone_id="zoneId",
)
print(members.items)
{
  "items": [
    {
      "id": "id",
      "_links": {
        "organization_user": {
          "href": "href"
        },
        "self": {
          "href": "href"
        }
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "organization_id": "organization_id",
      "organization_user_id": "organization_user_id",
      "role": "zone_manager",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "zone_id": "zone_id"
    }
  ],
  "page_info": {
    "has_next_page": true,
    "has_previous_page": true,
    "end_cursor": "end_cursor",
    "start_cursor": "start_cursor"
  },
  "pagination": {
    "after_cursor": "x",
    "before_cursor": "x",
    "total_count": 0
  }
}
Returns Examples
{
  "items": [
    {
      "id": "id",
      "_links": {
        "organization_user": {
          "href": "href"
        },
        "self": {
          "href": "href"
        }
      },
      "created_at": "2019-12-27T18:11:19.117Z",
      "organization_id": "organization_id",
      "organization_user_id": "organization_user_id",
      "role": "zone_manager",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "zone_id": "zone_id"
    }
  ],
  "page_info": {
    "has_next_page": true,
    "has_previous_page": true,
    "end_cursor": "end_cursor",
    "start_cursor": "start_cursor"
  },
  "pagination": {
    "after_cursor": "x",
    "before_cursor": "x",
    "total_count": 0
  }
}