list(options?: SortedListOptions): Promise<Page<ProductResource>>Fetches one page of the products the key can reach, unwrapped into items plus a pagination envelope. Private products with no grant for the key owner are filtered out before pagination is applied, so pagination.totalCount is the number of products this key can see and never the raw workspace total.
Every row carries locked, which is true for products sitting beyond the plan allowance. Locked products still list and still read, but an update against one is refused. search matches name and slug, order defaults to name and sorts A to Z, with asc and desc sorting oldest and newest first on createdAt.
Example
const page = await envless.products.list({ limit: 10, search: 'api' })
for (const product of page.items) {
console.log(product.slug, product.locked)
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
options.limit | number | No | Rows per page, a whole number from 1 to 100. |
options.offset | number | No | Rows to skip, a whole number of 0 or greater. |
options.search | string | No | Case-insensitive substring match against product 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<ProductResource> holding items and the pagination envelope.
Reads the products 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
limitoutside 1 to 100 is rejected as invalid pagination rather than clamped. - Pagination happens in memory after the access filter, so page boundaries shift if grants change between calls.
Required scopes
products:read
Underlying endpoint
GET /products
Request and response schema, every error code, and a live playground.
In Python
envless.products.list()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.products.list
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->products->list()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.