---
title: "Get environments by workspace"
method: GET
path: "/environments"
tags: ["Environment"]
---

# Get environments by workspace

`GET /environments`

Get all environments in a workspace

## Query parameters

- `workspace_id` string, required
- `limit` integer
- `cursor` string

## Response `200`

Environements in a given workspace

- EnvironmentQueryResult
  - `environments` Environment[] — All environments that match query
    - `id` string — Environment ID
    - `preview` boolean — True if a short-lived ephemeral environment
    - `created_time` integer — Time environment created
    - `created_by_id` string — ID of user who created environment
    - `last_updated_time` integer — Time environment last updated
    - `last_updated_by_id` string — ID of user who last updated environment
    - `organization_id` string — ID of organization (now workspace) associated with environment
    - `workspace_id` string — ID of workspace associated with environment
    - `name` string — Environment display name
    - `description` string — Environment description
    - `encrypted_variables` string — Serialized and encrypted environment variables
    - `variables` object — Environment variables
    - `link_agent_label` string — DEPRECATED - use link_agent_labels
    - `link_agent_labels` string[] — If specified, and if use_link_agent is true, test traffic will be routed through Link agents with any of these labels
    - `use_link_agent` boolean — If true, uses a Link Agent with specified link_agent_label for this environment
    - `link_bypass_mabl_proxy` boolean — If true, and if use_link_agent is true, test traffic will be routed directly via the Link Agent, bypassing the mabl HTTP proxy
    - `use_source_control_tag` boolean — If true, enables use of source_control_tag_target
    - `source_control_tag_target` string — All tests run in this environment will use this source control tag
    - `page_load_wait` 'FAST' | 'NORMAL' | 'SLOW' | 'SLOWER' — Time to wait after page loads, if supported by the runtime.
  - `cursor` string — Pagination cursor

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
