listAllHistory(project: string, environment: string, name: string, options?: ScopedListOptions): Promise<Array<VariableHistoryEvent>>Walks every page of the audit trail for a variable and resolves one array, newest event first.
The trail grows with every write, so a long lived variable in an active environment can cost many round trips and a large array. Reach for listHistory when you only need the most recent changes.
No values appear in any event, so this is safe to log or ship to an audit sink without decrypting anything.
Example
const events = await envless.variables.listAllHistory('api', 'production', 'STRIPE_SECRET_KEY')
console.log(events.length, events[0].type)Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
project | string | Yes | Project slug the environment belongs to. |
environment | string | Yes | Environment slug the variable lives in. |
name | string | Yes | Name of a live variable, matched without regard to case. |
options.limit | number | No | Page size for each underlying request, clamped to 100. |
options.offset | number | No | Offset the walk starts from, defaults to 0. |
options.product | string | No | Product slug, needed when the project slug is not unique in the workspace. |
options.signal | AbortSignal | No | Cancels every request in the walk. |
Returns
Array<VariableHistoryEvent> with the complete audit trail, newest first.
Reads the events 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
- Events keep their order across page boundaries, so
events[0]is the most recent change. - On the Free plan only the latest event is returned (the API's
historyLimitedandhiddenCountflags are not surfaced on the resolved array, so a one-item result on Free is the plan, not an empty history); the full trail needs Dev or above.
Required scopes
variables:read
Underlying endpoint
GET /projects/{slug}/environments/{environmentSlug}/variables/{name}/history
Request and response schema, every error code, and a live playground.
In Python
envless.variables.list_all_history()
The same method in envless-sdk, the Python SDK, with the same request, retries and errors.
In Ruby
Envless.variables.list_all_history
The same method in envless-sdk, the Ruby gem, with the same request, retries and errors.
In PHP
$envless->variables->listAllHistory()
The same method in envless/sdk, the PHP SDK, with the same request, retries and errors.