def list(
*,
limit: int | None = None,
offset: int | None = None,
search: str | None = None,
role_id: str | None = None,
timeout: float | None = None,
) -> Page[MemberResource]async def list(
*,
limit: int | None = None,
offset: int | None = None,
search: str | None = None,
role_id: str | None = None,
timeout: float | None = None,
) -> Page[MemberResource]Returns one page of everyone who has accepted membership of the workspace, as items plus the raw pagination envelope. Each row carries the member id that update, remove and the product access routes expect, the assigned role, and the underlying user.
search matches a member name, email or role name, and roleId keeps only the members holding that role. Pending invites are not members and never show up in these rows: read them from the invites namespace.
Example
from envless import envless
page = envless.members.list(limit=50)
for member in page['items']:
role, user = member['role'], member['user']
print(
member['id'],
role['name'] if role else None,
user['email'] if user else None,
)import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
page = await envless.members.list(limit=50)
for member in page['items']:
role, user = member['role'], member['user']
print(
member['id'],
role['name'] if role else None,
user['email'] if user else None,
)
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | int | No | Rows per page, a whole number from 1 to 100. |
offset | int | No | Rows to skip before the page starts. |
search | str | No | Case insensitive substring match on the member name, email or role name. |
role_id | str | No | Only members holding this role, by the role id from roles.list. |
timeout | float | No | Seconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
Page[MemberResource] with items and the pagination envelope.
Reads the members collection. list returns one page as a dict with items and pagination, list_all collects every page into a list, and iterate yields one item at a time, fetching the next page only when the loop reaches it. On AsyncEnvless, iterate is an async iterator for async for.
Worth knowing
- The API reads the whole member set and paginates it in memory, so
pagination['totalCount']is exact. usercan beNonewhen the user record cannot be resolved.roleis always populated for a real member.- A
limitabove 100 or a fractionaloffsetfails with 400request.invalid_paginationanderror.fieldnames the culprit.
Required scopes
members:read
Underlying endpoint
GET /members
Request and response schema, every error code, and a live playground.
In TypeScript
envless.members.list()
The same method in @goenvless/sdk, with the same request, retries and errors.