Get an environment
GET
/environments/:env_id
Base URL
https://app.testsigma.com/api/v1
Retrieve a specific environment and its variables by ID.
Authenticate with your API key as a
Bearer token in the
Authorization header. Generate a key →PATH PARAMETERS
env_id | The ID of the environment to retrieve. Found in the URL of the environment's detail page. |
RESPONSE ATTRIBUTES
id | Unique environment identifier. |
name | Environment name. |
description | Description of the environment. |
variables | Array of key-value variables. Each has id, key, value, isEncrypted, projectId. |
createdById | ID of the user who created the environment. |
updatedById | ID of the user who last updated it. |
createdDate | Epoch timestamp of creation. |
updatedDate | Epoch 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()RESPONSE200OK
{
"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
}
]
}