Skip to content
You're viewing the v2 docs. Looking for v1?Go to v1 docs
Docs
Testsigma
Popular questions
↑↓ to navigate↵ to selectesc to close
Book a demo

List environments

GET/environments
Base URL https://app.testsigma.com/api/v1Region

Get all environments in the account, with their variables.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
pageOptional. Page number, starting at 0.
sizeOptional. Results per page.
sortOptional. Sort order, such as id,desc.
projectIdOptional. Narrow the list to one project's environments.
idUnique environment identifier.
nameName of the environment.
descriptionEnvironment description.
variablesThe environment's variables, each with its key, value, and isEncrypted flag.
createdDateEpoch timestamp when the environment was created.
Request
curl -X GET \
  'https://app.testsigma.com/api/v1/environments' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://app.testsigma.com/api/v1/environments', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
});
const data = await response.json();
import requests

response = requests.get(
  'https://app.testsigma.com/api/v1/environments',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
)
data = response.json()
Response200 OK
[
  {
    "id": 10,
    "name": "Test environment1",
    "description": "Test Environment",
    "createdDate": 1732176819137,
    "variables": [
      {
        "id": 8,
        "key": "Url",
        "value": "https://google.com",
        "isEncrypted": false,
        "projectId": 9
      }
    ]
  }
]

Was this page helpful?