---
title: "Retrieves a Environment resource."
method: GET
path: "/v1/environments/{publicId}"
tags: ["Environment"]
---

# Retrieves a Environment resource.

`GET /v1/environments/{publicId}`

## Request

- Base URL: `https://api.fortrabbit.com`
- URL: `https://api.fortrabbit.com/v1/environments/{publicId}`
- Auth: HTTP bearer

Retrieves a Environment resource.

## Path parameters

- `publicId` string, required

## Response `200`

Environment resource

- EnvironmentApiReadApiReadEnvironmentVariablesApiReadPlatformVariables
  - `publicId` string
  - `name` string
  - `softwareVersion` string, nullable
  - `createdAt` string, date-time
  - `updatedAt` string, date-time
  - `domains` string[]
  - `components` object
  - `phpVersion` string, nullable
  - `buildCommands` string[]
  - `postDeployCommands` string[]
  - `git` object
    - `branch` string, nullable
    - `directory` string, nullable
  - `environmentVariables` object: Variables set on this environment by its owners, keyed by name.
  - `platformVariables` object: Variables injected by fortrabbit, keyed by name. Read-only: they cannot be added, changed or removed. Encrypted values, such as the database password, are not exposed.

## Other responses

- `404`: Not found

---

[API](https://skmtc.dev/fortrabbit/apis/fortrabbit-api.md) · [All operations](https://skmtc.dev/fortrabbit/apis/fortrabbit-api/llms.txt) · [OpenAPI document](https://skmtc.dev/fortrabbit/apis/fortrabbit-api/revisions/36ca73befa52?raw)
