---
title: "Retrieves a collection of environments for the specified site."
method: GET
path: "/sites/{siteId}/environments"
tags: ["Environments"]
---

# Retrieves a collection of environments for the specified site.

`GET /sites/{siteId}/environments`

## Request

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

## Path parameters

- `siteId` string, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

Environment collection

- object
  - `_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
    - `prev` EnvironmentServiceAPIHalLink: 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
    - `next` EnvironmentServiceAPIHalLink: 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
    - `offset` object: Templated link for offset
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` true, required: 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
    - `limit` object: Templated link for limit
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` true, required: 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, required: Embedded resources for the collection
    - `items` object[], required: The array of resources in the collection
      - `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)
  - `count` integer, required: The number of items in the current page
  - `total` integer, required: The total number of items available
  - `pagination` object, required
    - `total` integer, required: The total number of items available
    - `limit` integer, required: The maximum number of items to retrieve in a single page
    - `offset` integer, required: The starting position of the items to retrieve

## Other responses

- `400`: Validation Error
- `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)
