def list_all(slug, limit: nil, offset: nil, timeout: nil)def list_all: (
String slug,
?limit: Integer?,
?offset: Integer?,
?timeout: seconds?
) -> Array[product_access_entry]Walks every page of the grants recorded on a product and returns one flat array of entries.
This drops the private? flag that access.list returns, because it streams items only. Without that flag the grant list on its own says nothing about who can read the product, so call access.list once whenever the privacy state matters. An empty array means no grants are stored, not that nobody has access.
Example
require "envless/sdk"
grants = Envless.products.access.list_all("billing")
puts grants.map { |grant| grant[:id] }Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
slug | String | Yes | Product slug, or the product uniqueId when the value is UUID shaped. |
limit: | Integer | No | Page size for each underlying request, capped at 100. |
offset: | Integer | No | Row to start the walk from. |
timeout: | Integer | Float | Rational | No | Seconds each attempt of this call may take, redirects and the response body included, before it raises Envless::NetworkError with timeout? set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
An Array[product_access_entry], each holding the workspace member id and a user summary.
Reads the access collection. list returns one page as an Envless::ProductAccessPage with items and pagination, list_all collects every page into an array, and iterate yields one item at a time to a block, fetching the next page only when it gets there. Without a block, iterate returns an Enumerator.
Worth knowing
- Grant lists are small in practice, so this is usually the right variant, with
access.listreserved for the privacy flag.
Required scopes
product-access:read
Underlying endpoint
GET /products/{slug}/access
Request and response schema, every error code, and a live playground.
In TypeScript
envless.products.access.listAll()
The same method in @goenvless/sdk, with the same request, retries and errors.