listAll(options?: ScopedSortedListOptions): Promise<Array<ProjectResource>>Walks every page for you and resolves with the flattened result. Use it when the workspace is small enough that holding all projects in memory is fine and you would rather not manage offsets.
The trap is options.limit: here it sets the page size used while walking, not a cap on how many projects come back. Asking for a limit of 5 still returns everything, just in more round trips. Duplicate slugs across products survive into the array, so continue keying off id.
Example
const projects = await envless.projects.listAll({ search: 'api' })
console.log(projects.length)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options.product | string | No | Product slug or product uniqueId to restrict the walk to one product. |
options.limit | number | No | Page size used while walking, clamped to 100. |
options.offset | number | No | Row to start the walk from. |
options.search | string | No | Case insensitive substring match against project name and slug. |
options.order | string | No | Defaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt. |
options.signal | AbortSignal | No | Cancels every request in the walk. |
Returns
Array<ProjectResource> holding every project the key can reach.
Reads the projects 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
- Page size defaults to the API maximum of 100 and is clamped there, so a larger limit buys nothing.
- Nothing resolves until the final page lands. Prefer
iteratewhen you want to act on rows as they arrive.
Required scopes
projects:read
Underlying endpoint
GET /projects
Request and response schema, every error code, and a live playground.
In Python
envless.projects.list_all()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.projects.list_all
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->projects->listAll()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.