Skip to main content
GET
/
api
/
environments
/
list
List Environments
curl --request GET \
  --url https://api.example.com/api/environments/list \
  --header 'Authorization: <authorization>'
{
  "data": {
    "environments": [
      {
        "id": 1,
        "project_id": 42,
        "slug": "production",
        "name": "Production",
        "playwright_projects_match": ["*"],
        "playwright_projects_ignore": [],
        "is_disabled": false,
        "env_files": [],
        "scheduled_trigger": null,
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-02-01T14:20:00Z"
      },
      {
        "id": 2,
        "project_id": 42,
        "slug": "staging",
        "name": "Staging",
        "playwright_projects_match": ["chromium"],
        "playwright_projects_ignore": ["mobile-*"],
        "is_disabled": false,
        "env_files": [],
        "scheduled_trigger": "0 9 * * 1-5",
        "created_at": "2025-01-15T10:35:00Z",
        "updated_at": "2025-01-20T11:00:00Z"
      }
    ]
  }
}
Returns all environments configured for a project.

Examples

Request

Authorization
string
required
Bearer token for authentication. Format: Bearer <your-api-key>
project_id
number
The project ID. Required if project_repo_name is not provided.
project_repo_name
string
The project repository name. Required if project_id is not provided.
is_disabled
string
Set to false to return only enabled environments.

Response

data
object
{
  "data": {
    "environments": [
      {
        "id": 1,
        "project_id": 42,
        "slug": "production",
        "name": "Production",
        "playwright_projects_match": ["*"],
        "playwright_projects_ignore": [],
        "is_disabled": false,
        "env_files": [],
        "scheduled_trigger": null,
        "created_at": "2025-01-15T10:30:00Z",
        "updated_at": "2025-02-01T14:20:00Z"
      },
      {
        "id": 2,
        "project_id": 42,
        "slug": "staging",
        "name": "Staging",
        "playwright_projects_match": ["chromium"],
        "playwright_projects_ignore": ["mobile-*"],
        "is_disabled": false,
        "env_files": [],
        "scheduled_trigger": "0 9 * * 1-5",
        "created_at": "2025-01-15T10:35:00Z",
        "updated_at": "2025-01-20T11:00:00Z"
      }
    ]
  }
}

List all environments

curl -X GET \
  "https://dash.empirical.run/api/environments/list?project_id=42" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"

List enabled environments only

curl -X GET \
  "https://dash.empirical.run/api/environments/list?project_id=42&is_disabled=false" \
  -H "Authorization: Bearer $EMPIRICALRUN_KEY"