Skip to main content
GET
/
v1
/
apps
/
{id}
/
envs
Get Application Environment Variables
curl --request GET \
  --url https://api.vertracloud.app/v1/apps/{id}/envs
import requests

url = "https://api.vertracloud.app/v1/apps/{id}/envs"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.vertracloud.app/v1/apps/{id}/envs', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.vertracloud.app/v1/apps/{id}/envs",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.vertracloud.app/v1/apps/{id}/envs"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.vertracloud.app/v1/apps/{id}/envs")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.vertracloud.app/v1/apps/{id}/envs")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
{
  "response": [
    {
      "id": "env-abc123",
      "key": "API_KEY",
      "value": "secret123",
      "note": "API key for external service",
      "created_at": "2026-03-20T19:58:00Z"
    },
    {
      "id": "env-xyz789",
      "key": "DATABASE_URL",
      "value": "mysql://user:pass@localhost/db",
      "note": null,
      "created_at": "2026-03-20T19:58:00Z"
    }
  ]
}
id
string
required
The application ID to retrieve environment variables. If the application belongs to a workspace, include the workspace ID in the format appId-workspaceId.

Response

response
array
An array of environment variable objects.
{
  "response": [
    {
      "id": "env-abc123",
      "key": "API_KEY",
      "value": "secret123",
      "note": "API key for external service",
      "created_at": "2026-03-20T19:58:00Z"
    },
    {
      "id": "env-xyz789",
      "key": "DATABASE_URL",
      "value": "mysql://user:pass@localhost/db",
      "note": null,
      "created_at": "2026-03-20T19:58:00Z"
    }
  ]
}

Error Responses

code
string
The error code indicating the reason for the failure. Possible values:
  • UNAUTHORIZED: The user is not authenticated or does not have sufficient permissions.
  • FORBIDDEN: The user does not have permission to access the application.
  • APP_NOT_FOUND: The specified application does not exist.
message
string
A descriptive message providing additional details about the error.
{
  "code": "UNAUTHORIZED"
}
{
  "code": "APP_NOT_FOUND"
}