curl --request GET \
--url https://app.launchdarkly.com/api/v2/engineering-insights/deployments \
--header 'Authorization: <api-key>'import requests
url = "https://app.launchdarkly.com/api/v2/engineering-insights/deployments"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.launchdarkly.com/api/v2/engineering-insights/deployments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/engineering-insights/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/engineering-insights/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/engineering-insights/deployments")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/engineering-insights/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalCount": 25,
"items": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"applicationKey": "billing-service",
"applicationVersion": "a90a8a2",
"startedAt": "1706701522000",
"status": "finished",
"kind": "redeployment",
"active": true,
"archived": false,
"environmentKey": "production",
"numberOfContributors": 1,
"numberOfPullRequests": 2,
"linesAdded": 100,
"linesDeleted": 50,
"leadTime": 20237000,
"endedAt": "1706712518000",
"durationMs": 10996000,
"metadata": {
"buildNumber": "1234"
},
"pullRequests": {
"totalCount": 25,
"items": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"externalId": "1234",
"title": "Enable new payment structure",
"status": "merged",
"author": "jane.doe",
"createTime": "1706701522000",
"baseCommitKey": "a90a8a2",
"headCommitKey": "a90a8a2",
"filesChanged": 2,
"linesAdded": 100,
"linesDeleted": 50,
"url": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
"mergeTime": "1706712518000",
"mergeCommitKey": "a90a8a2",
"deployments": "<unknown>",
"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"
}
}
}{
"code": "invalid_request",
"message": "validation failed",
"errors": [
{
"attribute": "projectKey",
"reason": "must be present"
}
]
}{
"code": "unauthorized",
"message": "Invalid access token"
}{
"code": "forbidden",
"message": "Forbidden. Access to the requested resource was denied."
}{
"code": "not_found",
"message": "Invalid resource identifier"
}{
"code": "rate_limited",
"message": "You've exceeded the API rate limit. Try again later."
}List 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:
pullRequestsincludes details on all of the pull requests associated with each deploymentflagReferencesincludes 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.
curl --request GET \
--url https://app.launchdarkly.com/api/v2/engineering-insights/deployments \
--header 'Authorization: <api-key>'import requests
url = "https://app.launchdarkly.com/api/v2/engineering-insights/deployments"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.launchdarkly.com/api/v2/engineering-insights/deployments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/engineering-insights/deployments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/engineering-insights/deployments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/engineering-insights/deployments")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/engineering-insights/deployments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"totalCount": 25,
"items": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"applicationKey": "billing-service",
"applicationVersion": "a90a8a2",
"startedAt": "1706701522000",
"status": "finished",
"kind": "redeployment",
"active": true,
"archived": false,
"environmentKey": "production",
"numberOfContributors": 1,
"numberOfPullRequests": 2,
"linesAdded": 100,
"linesDeleted": 50,
"leadTime": 20237000,
"endedAt": "1706712518000",
"durationMs": 10996000,
"metadata": {
"buildNumber": "1234"
},
"pullRequests": {
"totalCount": 25,
"items": [
{
"id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
"externalId": "1234",
"title": "Enable new payment structure",
"status": "merged",
"author": "jane.doe",
"createTime": "1706701522000",
"baseCommitKey": "a90a8a2",
"headCommitKey": "a90a8a2",
"filesChanged": 2,
"linesAdded": 100,
"linesDeleted": 50,
"url": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
"mergeTime": "1706712518000",
"mergeCommitKey": "a90a8a2",
"deployments": "<unknown>",
"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"
}
}
}{
"code": "invalid_request",
"message": "validation failed",
"errors": [
{
"attribute": "projectKey",
"reason": "must be present"
}
]
}{
"code": "unauthorized",
"message": "Invalid access token"
}{
"code": "forbidden",
"message": "Forbidden. Access to the requested resource was denied."
}{
"code": "not_found",
"message": "Invalid resource identifier"
}{
"code": "rate_limited",
"message": "You've exceeded the API rate limit. Try again later."
}Authorizations
Query Parameters
The project key
The environment key
Comma separated list of application keys
The number of deployments to return. Default is 20. Maximum allowed is 100.
Expand properties in response. Options: pullRequests, flagReferences
Unix timestamp in milliseconds. Default value is 7 days ago.
Unix timestamp in milliseconds. Default value is now.
Identifier used for pagination
Identifier used for pagination
The deployment kind
The deployment status
Response
Deployment collection response
The total number of deployments
25
A list of deployments
Show child attributes
Show child attributes
The location and content type of related resources
Show child attributes
Show child attributes
{
"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"
}
}