---
title: "List deployments"
method: GET
path: "/api/v2/engineering-insights/deployments"
tags: ["Insights deployments (beta)"]
---

# List deployments

`GET /api/v2/engineering-insights/deployments`

Get a list of deployments

### Expanding the deployment collection response

LaunchDarkly supports expanding the deployment collection response to include additional fields.

To expand the response, append the `expand` query parameter and include the following:

* `pullRequests` includes details on all of the pull requests associated with each deployment
* `flagReferences` includes details on all of the references to flags in each deployment

For example, use `?expand=pullRequests` to include the `pullRequests` field in the response. By default, this field is **not** included in the response.

## Query parameters

- `projectKey` string, string, required — The project key
- `environmentKey` string, string, required — The environment key
- `applicationKey` string, string — Comma separated list of application keys
- `limit` integer — The number of deployments to return. Default is 20. Maximum allowed is 100.
- `expand` string, string — Expand properties in response. Options: `pullRequests`, `flagReferences`
- `from` integer — Unix timestamp in milliseconds. Default value is 7 days ago.
- `to` integer — Unix timestamp in milliseconds. Default value is now.
- `after` string, string — Identifier used for pagination
- `before` string, string — Identifier used for pagination
- `kind` string, string — The deployment kind
- `status` string, string — The deployment status

## Response `200`

Deployment collection response

- DeploymentCollectionRep
  - `totalCount` integer, required — The total number of deployments
  - `items` DeploymentRep[], required — A list of deployments
    - `id` string, uuid, required — The deployment ID
    - `applicationKey` string, required — The application key
    - `applicationVersion` string, required — The application version
    - `startedAt` integer, required
    - `endedAt` integer
    - `durationMs` integer — The duration of the deployment in milliseconds
    - `status` string, required
    - `kind` string, required
    - `active` boolean, required — Whether the deployment is active
    - `metadata` object — The metadata associated with the deployment
    - `archived` boolean, required — Whether the deployment is archived
    - `environmentKey` string, required — The environment key
    - `numberOfContributors` integer, required — The number of contributors
    - `numberOfPullRequests` integer, required — The number of pull requests
    - `linesAdded` integer, required — The number of lines added
    - `linesDeleted` integer, required — The number of lines deleted
    - `leadTime` integer, required — The total lead time from first commit to deployment end in milliseconds
    - `pullRequests` PullRequestCollectionRep
      - `totalCount` integer, required — The total number of pull requests
      - `items` PullRequestRep[], required — A list of pull requests
        - `id` string, uuid, required — The pull request internal ID
        - `externalId` string, required — The pull request number
        - `title` string, required — The pull request title
        - `status` string, required — The pull request status
        - `author` string, required — The pull request author
        - `createTime` integer, required
        - `mergeTime` integer
        - `mergeCommitKey` string — The pull request merge commit key
        - `baseCommitKey` string, required — The pull request base commit key
        - `headCommitKey` string, required — The pull request head commit key
        - `filesChanged` integer, required — The number of files changed
        - `linesAdded` integer, required — The number of lines added
        - `linesDeleted` integer, required — The number of lines deleted
        - `url` string, required — The pull request URL
        - `deployments` DeploymentCollectionRep — recursive
        - `flagReferences` FlagReferenceCollectionRep
          - `totalCount` integer, required — The total number of flag references
          - `items` FlagReferenceRep[], required — A list of flag references
            - `projectKey` string, required — The project key
            - `flagKey` string, required — The flag key
            - `referencesAdded` integer, required — The number of references added
            - `referencesRemoved` integer, required — The number of references removed
        - `leadTime` PullRequestLeadTimeRep
          - `codingDurationMs` integer, required — The coding duration in milliseconds
          - `reviewDurationMs` integer — The review duration in milliseconds
          - `maxWaitDurationMs` integer — The max wait duration between merge time and deploy start time in milliseconds
          - `avgWaitDurationMs` integer — The average wait duration between merge time and deploy start time in milliseconds
          - `maxDeployDurationMs` integer — The max deploy duration in milliseconds
          - `avgDeployDurationMs` integer — The average deploy duration in milliseconds
          - `maxTotalLeadTimeMs` integer — The max total lead time in milliseconds
          - `avgTotalLeadTimeMs` integer — The average total lead time in milliseconds
      - `_links` object — The location and content type of related resources
    - `flagReferences` FlagReferenceCollectionRep
      - `totalCount` integer, required — The total number of flag references
      - `items` FlagReferenceRep[], required — A list of flag references
        - `projectKey` string, required — The project key
        - `flagKey` string, required — The flag key
        - `referencesAdded` integer, required — The number of references added
        - `referencesRemoved` integer, required — The number of references removed
    - `leadTimeStages` LeadTimeStagesRep
      - `codingDurationMs` integer, required — The coding duration in milliseconds
      - `reviewDurationMs` integer — The review duration in milliseconds
      - `waitDurationMs` integer — The wait duration between merge time and deploy start time in milliseconds
      - `deployDurationMs` integer — The deploy duration in milliseconds
      - `totalLeadTimeMs` integer — The total lead time in milliseconds
  - `_links` object — The location and content type of related resources

## Other responses

- `400` — Invalid request
- `401` — Invalid access token
- `403` — Forbidden
- `404` — Invalid resource identifier
- `429` — Rate limited

---

[API](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api.md) · [All operations](https://skmtc.dev/launchdarkly/apis/launchdarkly-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/launchdarkly/launchdarkly-rest-api/revisions/69c5c9aafe78/schema)
