---
title: "Get an environment"
method: GET
path: "/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}"
tags: ["Deployments"]
---

# Get an environment

`GET /repositories/{workspace}/{repo_slug}/environments/{environment_uuid}`

## Request

- Base URL: `https://api.bitbucket.org/2.0`
- URL: `https://api.bitbucket.org/2.0/repositories/{workspace}/{repo_slug}/environments/{environment_uuid}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://bitbucket.org/site/oauth2/authorize`
    - Token URL: `https://bitbucket.org/site/oauth2/access_token` scopes: `pipeline`
  - HTTP basic
  - API key in header `Authorization`

Retrieve an environment

## Path parameters

- `workspace` string, required
- `repo_slug` string, required
- `environment_uuid` string, required

## Response `200`

The environment.

- DeploymentEnvironment: A Bitbucket Deployment Environment.
  - `type` string, required
  - `uuid` string: The UUID identifying the environment.
  - `name` string: The name of the environment.

## Other responses

- `404`: No account, repository or environment with the UUID provided exists.

---

[API](https://skmtc.dev/atlassian/apis/bitbucket-api.md) - [All operations](https://skmtc.dev/atlassian/apis/bitbucket-api/llms.txt) - [OpenAPI document](https://skmtc.dev/atlassian/apis/bitbucket-api/revisions/6ae783fa75da?raw)
