Products

envless.products.access.list()

List member grants and the privacy flag

ts
access.list(slug: string, options?: ListOptions): Promise<ProductAccessPage>

Reads one page of the explicit member grants recorded on a product. The resolved page adds isPrivate alongside items and pagination, and the two have to be read together: grants are stored whether or not the product is private, so an empty items array on a public product still means every workspace member can read it. The grant list only becomes an access control list once isPrivate is true.

items[].id is the workspace member id, the same id space the grant and revoke calls take, not the user id. The user id sits on items[].user.id, and user is null when no user record is attached to the membership. Entries are ordered by when each member joined the workspace, oldest first, then paginated in memory.

Example

ts
const page = await envless.products.access.list('billing')

console.log(page.isPrivate, page.pagination.totalCount)

for (const entry of page.items) {
    console.log(entry.id, entry.user?.email)
}

Parameters

ParameterTypeRequiredDescription
slugstringYesProduct slug, or the product uniqueId when the value is UUID shaped.
options.limitnumberNoRows per page, a whole number from 1 to 100.
options.offsetnumberNoRows to skip, a whole number of 0 or greater.
options.signalAbortSignalNoCancels the request.

Returns

ProductAccessPage with items, pagination and the product isPrivate flag.

Reads the access 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

  • The response collection key is access, so a raw HTTP caller reads data.access where the SDK exposes items.

Required scopes

product-access:read

Underlying endpoint

GET /products/{slug}/access

Request and response schema, every error code, and a live playground.

In Python

envless.products.access.list()

The same method in envless-sdk, the Python SDK, with the same request, retries and errors.

In Ruby

Envless.products.access.list

The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.

In PHP

$envless->products->access->list()

The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.