---
title: "Retrieves details for an environment by codebase and environment ID."
method: GET
path: "/codebases/{codebaseId}/environments/{environmentId}"
tags: ["Environments"]
---

# Retrieves details for an environment by codebase and environment ID.

`GET /codebases/{codebaseId}/environments/{environmentId}`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/codebases/{codebaseId}/environments/{environmentId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/codebases/:codebaseId/environments/:environmentId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `codebaseId` string, required
- `environmentId` string, required

## Response `200`

Environment details

- object: Environment properties
  - `id` string, required: The unique identifier of the environment
  - `name` string, required: The machine name of the environment
  - `label` string, required: The human-readable label of the environment
  - `description` string: A description of the environment
  - `status` 'normal' | 'allocated' | 'launching' | 'killed' | 'cancelled' | 'stopped', required: The current status of the environment
  - `flags` object, required: Environment configuration flags
  - `properties` object, required: Environment PHP and server properties
    - `version` string: PHP version
    - `max_execution_time` integer: Maximum execution time in seconds
    - `memory_limit` integer: Memory limit in MB
    - `apcu` integer: APCu cache size in MB
    - `client_max_body_size` integer: Maximum client body size in MB
    - `max_input_vars` integer: Maximum number of input variables
    - `max_post_size` integer: Maximum POST size in MB
    - `memcached_limit` integer: Memcached limit in MB
    - `upload_max_filesize` integer: Maximum upload file size in MB
    - `operating_system` string: Operating system codename
  - `reference` string, required: The code reference (branch, tag, or commit) deployed to this environment
  - `code_switch_status` 'IDLE' | 'IN_PROGRESS', required: The status of the Switch Code action
  - `ssh_url` string, uri, required: The SSH connection string for accessing this environment
  - `region` string: The cloud region where this environment is hosted
  - `domain_name` string, required: The default domain for this environment
  - `_links` object, required: HAL links for the resource
    - `self` EnvironmentServiceAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object: Embedded resources (optional)
    - `codebase` object: Embedded codebase resource
      - `id` string, required: The unique identifier of the codebase
      - `_links` object, required: HAL links for the resource
        - `self` EnvironmentServiceAPIHalLink, required: HAL link object
          - `href` union, required: The target URI of the link (can be a URI or URI template)
            - string, uri
            - string, uri-template
          - `templated` boolean: Whether the link is a URI template
          - `type` string: Hint about the media type expected when dereferencing the target resource
          - `deprecation` string: A URL to a resource that provides deprecation information
          - `name` string: A secondary key for selecting links
          - `profile` string: A URI that hints about the profile of the target resource
          - `title` string: A human-readable identifier for the link
          - `hreflang` string: The language of the target resource
      - `_embedded` object: Embedded resources (optional)

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
