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.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Query Parameters

projectKey*string

The project key

Formatstring
environmentKey*string

The environment key

Formatstring
applicationKey?string

Comma separated list of application keys

Formatstring
limit?integer

The number of deployments to return. Default is 20. Maximum allowed is 100.

Formatint64
expand?string

Expand properties in response. Options: pullRequests, flagReferences

Formatstring
from?integer

Unix timestamp in milliseconds. Default value is 7 days ago.

Formatint64
to?integer

Unix timestamp in milliseconds. Default value is now.

Formatint64
after?string

Identifier used for pagination

Formatstring
before?string

Identifier used for pagination

Formatstring
kind?string

The deployment kind

Formatstring
status?string

The deployment status

Formatstring

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/engineering-insights/deployments?projectKey=string&environmentKey=string"
{  "totalCount": 25,  "items": [    {      "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",      "applicationKey": "billing-service",      "applicationVersion": "a90a8a2",      "startedAt": "1706701522000",      "endedAt": "1706712518000",      "durationMs": 10996000,      "status": "finished",      "kind": "redeployment",      "active": true,      "metadata": {        "buildNumber": "1234"      },      "archived": false,      "environmentKey": "production",      "numberOfContributors": 1,      "numberOfPullRequests": 2,      "linesAdded": 100,      "linesDeleted": 50,      "leadTime": 20237000,      "pullRequests": {        "totalCount": 25,        "items": [          {            "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",            "externalId": "1234",            "title": "Enable new payment structure",            "status": "merged",            "author": "jane.doe",            "createTime": "1706701522000",            "mergeTime": "1706712518000",            "mergeCommitKey": "a90a8a2",            "baseCommitKey": "a90a8a2",            "headCommitKey": "a90a8a2",            "filesChanged": 2,            "linesAdded": 100,            "linesDeleted": 50,            "url": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",            "deployments": {},            "flagReferences": {              "totalCount": 25,              "items": [                {                  "projectKey": "default",                  "flagKey": "enable-new-payment-structure",                  "referencesAdded": 2,                  "referencesRemoved": 5                }              ]            },            "leadTime": {              "codingDurationMs": 1000000,              "reviewDurationMs": 500000,              "maxWaitDurationMs": 100000,              "avgWaitDurationMs": 100000,              "maxDeployDurationMs": 100000,              "avgDeployDurationMs": 100000,              "maxTotalLeadTimeMs": 1600000,              "avgTotalLeadTimeMs": 1600000            }          }        ],        "_links": {          "next": {            "href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",            "type": "application/json"          },          "self": {            "href": "/api/v2/engineering-insights/pull-requests",            "type": "application/json"          }        }      },      "flagReferences": {        "totalCount": 25,        "items": [          {            "projectKey": "default",            "flagKey": "enable-new-payment-structure",            "referencesAdded": 2,            "referencesRemoved": 5          }        ]      },      "leadTimeStages": {        "codingDurationMs": 1000000,        "reviewDurationMs": 500000,        "waitDurationMs": 100000,        "deployDurationMs": 100000,        "totalLeadTimeMs": 1600000      }    }  ],  "_links": {    "next": {      "href": "/api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",      "type": "application/json"    },    "self": {      "href": "/api/v2/engineering-insights/deployments",      "type": "application/json"    }  }}