---
title: "Retrieves a collection of deployments for the specified environment."
method: GET
path: "/environments/{environmentId}/deployments"
tags: ["Deployments"]
---

# Retrieves a collection of deployments for the specified environment.

`GET /environments/{environmentId}/deployments`

## Request

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

## Path parameters

- `environmentId` string, required

## Query parameters

- `offset` integer
- `limit` integer
- `filter` string
- `sort` string

## Response `200`

OK

- 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
    - `filter` object: Templated link for filtering. The `filter` query parameter is a string to signify the fields to filter the result set by. If the filter includes logical filters this string will be delimited by a "," for a logical OR filter, or a ";" for logical AND filters. Note: Only one type logical filter will be accepted. If the filter contains both OR and AND filters it will be rejected. (e.g. filter=field=value*;field2=value2* indicates that the result set will be filtered by "field" using the term "value*" AND "field2" using the term "value2*". Note that * is a wildcard character in this context). Allowed filter operators are: Equals: = (%3D), Does not equal: != (!%3D), Greater than: > (%3E), Less than: < (%3C), Greater than or equal to: >= (%3E%3D), Less than or equal to: <= (%3C%3D), Contains substring: =@ (%3D@), Does not contain substring: !@ (!@)
      - `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
    - `sort` object: Templated link for sorting. The `sort` query parameter is a comma-delimited string with fields that are used for sorting. The order of fields is significant. A leading "-" in the field name indicates the field should be sorted in descending order. (e.g. sort=field,-field2 indicates that the result set will be sorted by "field" in ascending order, then by "field2" in descending order.)
      - `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: Unique identifier for the deployment.
      - `environment_id` string, required: Identifier of the environment this deployment belongs to.
      - `status` 'waiting' | 'received' | 'started' | 'done' | 'failed' | 'error' | 'killed', required: Current status of the deployment.
      - `code_reference` string, required: The code reference (e.g. branch or tag) deployed.
      - `run_hooks` boolean, required: Whether deployment hooks were run.
      - `hooks_argument` string, nullable: Additional arguments passed to deployment hooks.
      - `created_at` string, date-time, required: Timestamp when the deployment was created.
      - `started_at` string, date-time, nullable: Timestamp when the deployment started.
      - `completed_at` string, date-time, nullable: Timestamp when the deployment completed.
      - `sender_id` string, nullable: Identifier of the user or system that initiated the deployment.
      - `logs` string, nullable: Deployment log output.
      - `_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)
