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

Get an environment

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

Retrieve a specific environment and its variables by ID.

Authenticate with your API key as a Bearer token in the Authorization header. How to authenticate →
env_idThe ID of the environment to retrieve. Found in the URL of the environment's detail page.
idUnique environment identifier.
nameEnvironment name.
descriptionDescription of the environment.
variablesArray of key-value variables. Each has id, key, value, isEncrypted, projectId.
createdByIdID of the user who created the environment.
updatedByIdID of the user who last updated it.
createdDateEpoch timestamp of creation.
updatedDateEpoch timestamp of the last update.
Request
curl -X GET \
  'https://app.testsigma.com/api/v1/environments/{env_id}' \
  -H 'Authorization: Bearer <API_KEY>' \
  -H 'Content-Type: application/json'
const response = await fetch('https://app.testsigma.com/api/v1/environments/{env_id}', {
  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/{env_id}',
  headers={
    'Authorization': 'Bearer <API_KEY>',
    'Content-Type': 'application/json'
  }
)
data = response.json()
Response200 OK
{
  "id": 10,
  "name": "Staging",
  "description": "Staging environment",
  "createdById": 9,
  "updatedById": 9,
  "createdDate": 1732176819137,
  "updatedDate": 1732176819137,
  "variables": [
    {
      "id": 8,
      "key": "Url",
      "value": "https://staging.testsigma.com",
      "isEncrypted": false,
      "projectId": 9
    }
  ]
}

Was this page helpful?