Skip to content
  • Auto
  • Light
  • Dark
Get Started
View as Markdown
Copy Markdown

Open in Claude
Open in ChatGPT

List

client.vals.environmentVariables.list(stringvalID, EnvironmentVariableListParams { limit, offset } query, RequestOptionsoptions?): PageCursorURL<EnvironmentVariableListResponse { createdAt, description, key, updatedAt } >
get/v2/vals/{val_id}/environment_variables

List environment variables defined in this project. This only includes names, not values.

ParametersExpand Collapse
valID: string
query: EnvironmentVariableListParams { limit, offset }
limit: number

Maximum items to return in each paginated response

minimum1
maximum100
offset: number

Number of items to skip in order to deliver paginated results

minimum0
ReturnsExpand Collapse
EnvironmentVariableListResponse { createdAt, description, key, updatedAt }

An environment variable

createdAt: string
description: string | null

Optional description of the environment variable

maxLength1024
key: string

Name or key of the environment variable, accessible via Deno.env or process.env

maxLength8192
updatedAt: string
import ValTown from "npm:@valtown/sdk";

const client = new ValTown();

// Automatically fetches more pages as needed.
for await (const environmentVariableListResponse of client.vals.environmentVariables.list(
  '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  { limit: 1, offset: 0 },
)) {
  console.log(environmentVariableListResponse.createdAt);
}
{
  "data": [
    {
      "createdAt": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "key": "key",
      "updatedAt": "2019-12-27T18:11:19.117Z"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}
Returns Examples
{
  "data": [
    {
      "createdAt": "2019-12-27T18:11:19.117Z",
      "description": "description",
      "key": "key",
      "updatedAt": "2019-12-27T18:11:19.117Z"
    }
  ],
  "links": {
    "self": "https://example.com",
    "next": "https://example.com",
    "prev": "https://example.com"
  }
}