---
title: "Get environment"
method: GET
path: "/v1/workspaces/{workspaceId}/environments/{environmentId}"
---

# Get environment

`GET /v1/workspaces/{workspaceId}/environments/{environmentId}`

## Path parameters

- `workspaceId` string, required
- `environmentId` string, required

## Response `200`

OK response

- EnvironmentWithSystems
  - `createdAt` string, date-time, required
  - `description` string
  - `id` string, required
  - `metadata` object
  - `name` string, required
  - `resourceSelector` string — CEL expression to determine if the environment should be used
  - `systems` System[], required
    - `description` string
    - `id` string, required
    - `metadata` object
    - `name` string, required
    - `slug` string, required
    - `workspaceId` string, required

## Other responses

- `400` — Invalid request
- `404` — Resource not found

## Changes

- **2026-03-11** `ac4f338f40a7` — 1 breaking, 1 info
  - the `allOf[#/components/schemas/Environment]/resourceSelector` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - removed `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` from the `allOf[#/components/schemas/Environment]/resourceSelector` response property `oneOf` list for the response status `200`
- **2026-02-19** `e61389fc98ac` — 2 breaking
  - added `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` to the `allOf[#/components/schemas/Environment]/resourceSelector` response property `oneOf` list for the response status `200`
  - the `allOf[#/components/schemas/Environment]/resourceSelector` response's property type/format changed from `string`/`` to ``/`` for status `200`

[Change history](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/changes/v1/workspaces/:workspaceId/environments/:environmentId/get.md)

---

[API](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api.md) · [All operations](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ctrlplanedev/ctrlplane-api/revisions/156e0d264995/schema)
