List environments
GET
/environments
Base URL
https://app.testsigma.com/api/v1
Retrieve all environments configured in the workspace.
Authenticate with your API key as a
Bearer token in the
Authorization header. Generate a key →RESPONSE ATTRIBUTES
id | Unique environment identifier. |
name | Environment name. |
description | Description of the environment. |
variables | Array of key-value variables defined for this environment. |
createdById | ID of the user who created the environment. |
createdDate | Epoch timestamp of creation. |
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()RESPONSE200OK
{
"content": [
{
"id": 10,
"name": "Staging",
"description": "Staging environment",
"createdById": 9,
"createdDate": 1732176819137,
"variables": [
{
"id": 8,
"key": "Url",
"value": "https://staging.testsigma.com",
"isEncrypted": false
}
]
},
{
"id": 11,
"name": "Production",
"description": "Production environment",
"createdById": 9,
"createdDate": 1732200000000,
"variables": [
{
"id": 9,
"key": "Url",
"value": "https://app.testsigma.com",
"isEncrypted": false
}
]
}
],
"totalElements": 2,
"totalPages": 1
}