List environment variables
Read an application’s environment variables as a key-value object with GET /v2/apps//envs. Returns an empty object when none are set.
GET
List environment variables
string
required
The API key for your account. You can find this in your account settings.
envs:read scope.
Returns the application’s current environment variables as a flat key-value object, read directly from its .env file on the cluster. If no variables have been set yet, the response is a success with an empty object rather than an error.
Static applications don’t support environment variables and return an error instead. On workspace-shared applications, the caller needs the admin role or ownership.
To add or update variables, use Add/Edit Variables; to replace the whole set, see Overwrite Variables.
Parameters
string
required
The application ID.
Response
string
Indicates whether the call was successful:
success if it was, error if not.object
The key and value of all environment variables you defined.
Common errors
Related
- CLI:
squarecloud app env list - SDKs:
api.apps.envs.get()(JavaScript),client.apps.envs.get()(Python),c.Apps.Envs.Get()(Go)

