Skip to main content
GET
/
api
/
v2
/
engineering-insights
/
pull-requests
List pull requests
curl --request GET \
  --url https://app.launchdarkly.com/api/v2/engineering-insights/pull-requests \
  --header 'Authorization: <api-key>'
{
  "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": {
        "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": "<unknown>",
            "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"
          }
        }
      },
      "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"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Query Parameters

projectKey
string<string>
required

The project key

environmentKey
string<string>

Required if you are using the sort parameter's leadTime option to sort pull requests.

applicationKey
string<string>

Filter the results to pull requests deployed to a comma separated list of applications

status
string<string>

Filter results to pull requests with the given status. Options: open, merged, closed, deployed.

query
string<string>

Filter list of pull requests by title or author

limit
integer<int64>

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

expand
string<string>

Expand properties in response. Options: deployments, flagReferences, leadTime.

sort
string<string>

Sort results. Requires the environmentKey to be set. Options: leadTime (asc) and -leadTime (desc). When query option is excluded, default sort is by created or merged date.

from
string<date-time>

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

to
string<date-time>

Unix timestamp in milliseconds. Default value is now.

after
string<string>

Identifier used for pagination

before
string<string>

Identifier used for pagination

Response

Pull request collection response

totalCount
integer
required

The total number of pull requests

Example:

25

items
object[]
required

A list of pull requests

The location and content type of related resources

Example:
{
"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"
}
}