listEntries(project: string, environment: string, options?: ScopedListOptions): Promise<Page<VersionEntryResource>>Returns one page of the raw ciphertext of every version entry in the environment, across all versions, so it can be re-encrypted client side. Together with reencryptEntries this is the passphrase rotation pair.
The payload is deliberately thin: id, value and defaultValue, with no variable name and no version id, because rotation is blind and you decrypt and re-encrypt keyed on id alone. Pagination is applied in memory after the server loads the whole history, so a page is stable within a run but not cheap on a large environment.
Rotating the live variables without also rewriting these entries silently breaks every later rollback. If the rotation itself is all you want, rotateWorkspacePassphrase exported from the package root walks both live variables and history for you.
Example
const page = await envless.versions.listEntries('api', 'production', { limit: 100 })
console.log(page.items.length, page.pagination.totalCount, page.pagination.hasMore)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. |
options.product | string | No | Product slug used to disambiguate a project slug shared across products. |
options.limit | number | No | Rows per page, a whole number from 1 to 100. |
options.offset | number | No | Rows to skip before the page starts. |
options.signal | AbortSignal | No | Cancels the request. |
Returns
Page<VersionEntryResource> whose items are { id, value, defaultValue }, plus the pagination envelope.
Reads the entries 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
- Requires both
versions:readandvariables:read. - Keep
options.limitat 100 or below.reencryptEntriestakes at most 200 entries per call, so a page of 100 is the practical round trip. - Entries are flat across the environment, so two rows can hold the same plaintext from different versions. That is expected.
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 Python
envless.versions.list_entries()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.versions.list_entries
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->versions->listEntries()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.