def list_all_entries(
project,
environment,
limit: nil,
offset: nil,
product: nil,
timeout: nil
)def list_all_entries: (
String project,
String environment,
?limit: Integer?,
?offset: Integer?,
?product: (String | Symbol)?,
?timeout: seconds?
) -> Array[version_entry_resource]Walks every page and returns one array holding every version entry in the environment. This is the shape a rotation wants: decrypt each value and defaultValue with the old key, re-encrypt with the new one, then write the results back in batches through reencrypt_entries.
It holds the entire encrypted history of the environment in memory at once, and the server rebuilds that history on every request, so prefer iterate_entries on a large environment. limit: only sets the page size used while walking, clamped to 100, it does not cap how many entries come back.
Envless.rotate_workspace_passphrase already does this walk plus the re-encryption and the batched write back for both live variables and history, so call this directly only when you need a custom rotation.
Example
require "envless/sdk"
entries = Envless.versions.list_all_entries(
"api",
"production",
product: "billing"
)
puts entries.count { |entry| entry[:value] }Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | String | Yes | Project slug or project uniqueId. |
environment | String | Yes | Environment slug, since an environment uniqueId will not resolve here. |
product: | String | Symbol | No | Product slug used to disambiguate a project slug shared across products. |
limit: | Integer | No | Page size used while walking, clamped to 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
Array[version_entry_resource] holding every entry across every version of the environment.
Reads the entries collection. list returns one page as an Envless::Page 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
- Entries with a
nilvaluedo occur. Skip them instead of feeding them to a decrypt call. - Split the array into batches of at most 200 before writing it back, since a longer
entriesarray is rejected with 400.
Required scopes
versions:read and variables:read
Underlying endpoint
GET /projects/{slug}/environments/{environmentSlug}/versions/entries
Request and response schema, every error code, and a live playground.
In TypeScript
envless.versions.listAllEntries()
The same method in @goenvless/sdk, with the same request, retries and errors.