def list(
*,
limit: int | None = None,
offset: int | None = None,
search: str | None = None,
order: str | None = None,
product: str | None = None,
timeout: float | None = None,
) -> Page[ProjectResource]async def list(
*,
limit: int | None = None,
offset: int | None = None,
search: str | None = None,
order: str | None = None,
product: str | None = None,
timeout: float | None = None,
) -> 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 dict so you never need a second call to disambiguate. Pass product= to narrow to one product.
Example
from envless import envless
page = envless.projects.list(product='billing', limit=50)
for project in page['items']:
product = project['product']
print(
product['slug'] if product else None, project['slug']
)import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
page = await envless.projects.list(product='billing', limit=50)
for project in page['items']:
product = project['product']
print(
product['slug'] if product else None, project['slug']
)
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
product | str | No | Product slug or product uniqueId to filter the list down to one product. |
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 against project name and slug. |
order | str | No | Defaults to name, which sorts A to Z. Pass asc for oldest first or desc for newest first on createdAt. |
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[ProjectResource] with items and the pagination envelope.
Reads the projects 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
- An unknown or inaccessible
product=fails 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 TypeScript
envless.projects.list()
The same method in @goenvless/sdk, with the same request, retries and errors.