listAll(options?: ListOptions): Promise<Array<WorkspaceResource>>Walks the pages for you and resolves with a single flat array of memberships. Most owners belong to a handful of workspaces, so this is usually the right call and rarely costs more than one request.
The pagination envelope is discarded, so you lose totalCount and hasMore. Use list when you need those, or iterate when you want to stop early instead of buffering the whole set.
Example
const workspaces = await envless.workspaces.listAll()
const others = workspaces.filter((workspace) => !workspace.current)
console.log(others.map((workspace) => workspace.slug))Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options.limit | number | No | Page size used while walking, capped at 100 and defaulting to 100. |
options.offset | number | No | Row to start the walk from, so earlier memberships are left out of the result. |
options.signal | AbortSignal | No | Cancels every request in the walk. |
Returns
Array<WorkspaceResource> holding each workspace the key owner belongs to.
Reads the workspaces collection. list returns one page as { items, pagination }, listAll collects every page into an array, and iterate streams one item at a time without buffering the whole set.
Worth knowing
- A failure on any page rejects the whole call, and the partially collected rows are lost.
Required scopes
workspace:read
Underlying endpoint
GET /workspaces
Request and response schema, every error code, and a live playground.
In Python
envless.workspaces.list_all()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.workspaces.list_all
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->workspaces->listAll()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.