List environments
GET
/environmentsBase URL
https://app.testsigma.com/api/v1RegionGet all environments in the account, with their variables.
Authenticate with your API key as a
Bearer token in the Authorization header. How to authenticate →Query parameters
page | Optional. Page number, starting at 0. |
size | Optional. Results per page. |
sort | Optional. Sort order, such as id,desc. |
projectId | Optional. Narrow the list to one project's environments. |
Response attributes
id | Unique environment identifier. |
name | Name of the environment. |
description | Environment description. |
variables | The environment's variables, each with its key, value, and isEncrypted flag. |
createdDate | Epoch 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?
Thanks for the feedback.