def list_all(
limit: nil,
offset: nil,
search: nil,
role_id: nil,
timeout: nil
)def list_all: (
?limit: Integer?,
?offset: Integer?,
?search: (String | Symbol)?,
?role_id: (String | Symbol)?,
?timeout: seconds?
) -> Array[member_resource]Walks every page and returns the flattened member list. Membership counts are small compared with variables, so this is usually the right call for building a role table or a seat report.
limit: sets the page size used while walking, not a cap on how many members come back. Asking for a limit of 5 still returns everyone, just in more round trips. Nothing is returned until the last page lands.
Example
require "envless/sdk"
members = Envless.members.list_all
admins = members.select do |member|
member.dig(:role, :name) == "Admin"
end
puts "#{members.size} #{admins.size}"Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit: | Integer | No | Page size used while walking, clamped to 100. |
offset: | Integer | No | Row to start the walk from. |
search: | String | Symbol | No | Case insensitive substring match on the member name, email or role name. |
role_id: | String | Symbol | No | Only members holding this role, by the role id from roles.list. |
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
Array[member_resource] holding every accepted member of the workspace.
Reads the members collection. list returns one page as an Envless::Page with items and pagination, list_all collects every page into an array, and iterate yields one item at a time to a block, fetching the next page only when it gets there. Without a block, iterate returns an Enumerator.
Worth knowing
- Page size defaults to the API maximum of 100 and is clamped there, so a larger limit buys nothing.
- Key off
member[:id]rather thanmember.dig(:user, :id), sinceuseris nullable and onlyidis accepted by the write routes.
Required scopes
members:read
Underlying endpoint
GET /members
Request and response schema, every error code, and a live playground.
In TypeScript
envless.members.listAll()
The same method in @goenvless/sdk, with the same request, retries and errors.