def list_entries(
project: str,
environment: str,
*,
limit: int | None = None,
offset: int | None = None,
product: str | None = None,
timeout: float | None = None,
) -> Page[VersionEntryResource]async def list_entries(
project: str,
environment: str,
*,
limit: int | None = None,
offset: int | None = None,
product: str | None = None,
timeout: float | None = None,
) -> 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 reencrypt_entries 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, rotate_workspace_passphrase exported from the package root walks both live variables and history for you.
Example
from envless import envless
page = envless.versions.list_entries(
'api', 'production', limit=100
)
print(
len(page['items']),
page['pagination']['totalCount'],
page['pagination']['hasMore'],
)import asyncio
from envless import AsyncEnvless
async def main() -> None:
async with AsyncEnvless() as envless:
page = await envless.versions.list_entries(
'api', 'production', limit=100
)
print(
len(page['items']),
page['pagination']['totalCount'],
page['pagination']['hasMore'],
)
asyncio.run(main())Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | str | Yes | Project slug or project uniqueId. |
environment | str | Yes | Environment slug, since an environment uniqueId will not resolve here. |
product | str | No | Product slug used to disambiguate a project slug shared across products. |
limit | int | No | Rows per page, a whole number from 1 to 100. |
offset | int | No | Rows to skip before the page starts. |
timeout | float | No | Seconds each attempt of this call may take, the response body included, before it raises EnvlessNetworkError with is_timeout set. Overrides the client's timeout for this call, and 0 turns the limit off. |
Returns
Page[VersionEntryResource] whose items are dicts holding id, value and defaultValue, plus the pagination envelope.
Reads the entries collection. list returns one page as a dict with items and pagination, list_all collects every page into a list, and iterate yields one item at a time, fetching the next page only when the loop reaches it. On AsyncEnvless, iterate is an async iterator for async for.
Worth knowing
- Requires both
versions:readandvariables:read. - Keep
limit=at 100 or below.reencrypt_entriestakes 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 TypeScript
envless.versions.listEntries()
The same method in @goenvless/sdk, with the same request, retries and errors.