list(options?: ScopedSortedListOptions): Promise<Page<ProjectResource>>Returns a single page of projects drawn from every product the key can reach, as items plus the raw pagination envelope. Nothing is fetched beyond that page, so read pagination.hasMore before assuming you have the whole set.
Project slugs are unique per product, not per workspace, so this flat list can legitimately hold two rows with the same slug. Key off id, or off the product.slug and slug pair. Every row carries its product object so you never need a second call to disambiguate. Pass options.product to narrow to one product.
Example
const page = await envless.projects.list({ product: 'billing', limit: 50 })
for (const project of page.items) console.log(project.product?.slug, project.slug)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options.product | string | No | Product slug or product uniqueId to filter the list down to one product. |
options.limit | number | No | Rows per page, a whole number from 1 to 100. |
options.offset | number | No | Rows to skip before the page starts. |
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 the request. |
Returns
Page<ProjectResource> with items and the pagination envelope.
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
- An unknown or inaccessible
options.productfails with 404product.not_found, it does not quietly return an empty page. - Projects a restricted key cannot reach are simply absent from the page rather than rejected.
Required scopes
projects:read
Underlying endpoint
GET /projects
Request and response schema, every error code, and a live playground.
In Python
envless.projects.list()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.projects.list
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->projects->list()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.