For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
      • GETList pull requests
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewInsights Pull Requests Beta

List pull requests

GET
/api/v2/engineering-insights/pull-requests
GET
/api/v2/engineering-insights/pull-requests
$curl -G https://app.launchdarkly.com/api/v2/engineering-insights/pull-requests \
> -H "Authorization: <apiKey>" \
> -d projectKey=projectKey
1{
2 "totalCount": 25,
3 "items": [
4 {
5 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
6 "externalId": "1234",
7 "title": "Enable new payment structure",
8 "status": "merged",
9 "author": "jane.doe",
10 "createTime": 1706701522000,
11 "baseCommitKey": "a90a8a2",
12 "headCommitKey": "a90a8a2",
13 "filesChanged": 2,
14 "linesAdded": 100,
15 "linesDeleted": 50,
16 "url": "https://github.com/launchdarkly/LaunchDarkly-Docs/pull/406",
17 "mergeTime": 1706712518000,
18 "mergeCommitKey": "a90a8a2",
19 "deployments": {
20 "totalCount": 25,
21 "items": [
22 {
23 "id": "a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11",
24 "applicationKey": "billing-service",
25 "applicationVersion": "a90a8a2",
26 "startedAt": 1706701522000,
27 "status": "finished",
28 "kind": "redeployment",
29 "active": true,
30 "archived": false,
31 "environmentKey": "production",
32 "numberOfContributors": 1,
33 "numberOfPullRequests": 2,
34 "linesAdded": 100,
35 "linesDeleted": 50,
36 "leadTime": 20237000,
37 "endedAt": 1706712518000,
38 "durationMs": 10996000,
39 "metadata": {
40 "buildNumber": "1234"
41 },
42 "pullRequests": {
43 "totalCount": 25,
44 "items": [
45 null
46 ],
47 "_links": {
48 "next": {
49 "href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
50 "type": "application/json"
51 },
52 "self": {
53 "href": "/api/v2/engineering-insights/pull-requests",
54 "type": "application/json"
55 }
56 }
57 },
58 "flagReferences": {
59 "totalCount": 25,
60 "items": [
61 {
62 "projectKey": "default",
63 "flagKey": "enable-new-payment-structure",
64 "referencesAdded": 2,
65 "referencesRemoved": 5
66 }
67 ]
68 },
69 "leadTimeStages": {
70 "codingDurationMs": 1000000,
71 "reviewDurationMs": 500000,
72 "waitDurationMs": 100000,
73 "deployDurationMs": 100000,
74 "totalLeadTimeMs": 1600000
75 }
76 }
77 ],
78 "_links": {
79 "next": {
80 "href": "/api/v2/engineering-insights/deployments?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
81 "type": "application/json"
82 },
83 "self": {
84 "href": "/api/v2/engineering-insights/deployments",
85 "type": "application/json"
86 }
87 }
88 },
89 "flagReferences": {
90 "totalCount": 25,
91 "items": [
92 {
93 "projectKey": "default",
94 "flagKey": "enable-new-payment-structure",
95 "referencesAdded": 2,
96 "referencesRemoved": 5
97 }
98 ]
99 },
100 "leadTime": {
101 "codingDurationMs": 1000000,
102 "reviewDurationMs": 500000,
103 "maxWaitDurationMs": 100000,
104 "avgWaitDurationMs": 100000,
105 "maxDeployDurationMs": 100000,
106 "avgDeployDurationMs": 100000,
107 "maxTotalLeadTimeMs": 1600000,
108 "avgTotalLeadTimeMs": 1600000
109 }
110 }
111 ],
112 "_links": {
113 "next": {
114 "href": "/api/v2/engineering-insights/pull-requests?after=a4290006-1fd1-4ca5-acf7-9f31fac61cf5",
115 "type": "application/json"
116 },
117 "self": {
118 "href": "/api/v2/engineering-insights/pull-requests",
119 "type": "application/json"
120 }
121 }
122}
Get a list of pull requests ### Expanding the pull request collection response LaunchDarkly supports expanding the pull request collection response to include additional fields. To expand the response, append the `expand` query parameter and include the following: * `deployments` includes details on all of the deployments associated with each pull request * `flagReferences` includes details on all of the references to flags in each pull request * `leadTime` includes details about the lead time of the pull request for each stage For example, use `?expand=deployments` to include the `deployments` field in the response. By default, this field is **not** included in the response.
Was this page helpful?
Previous

Insights Repositories Beta

Next
Built with

Get a list of pull requests

Expanding the pull request collection response

LaunchDarkly supports expanding the pull request collection response to include additional fields.

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

  • deployments includes details on all of the deployments associated with each pull request
  • flagReferences includes details on all of the references to flags in each pull request
  • leadTime includes details about the lead time of the pull request for each stage

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

Authentication

Authorizationstring
API Key authentication via header

Query parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringOptionalformat: "string"

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

applicationKeystringOptionalformat: "string"
Filter the results to pull requests deployed to a comma separated list of applications
statusstringOptionalformat: "string"

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

querystringOptionalformat: "string"
Filter list of pull requests by title or author
limitlongOptional
The number of pull requests to return. Default is 20. Maximum allowed is 100.
expandstringOptionalformat: "string"

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

sortstringOptionalformat: "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.

fromdatetimeOptional
Unix timestamp in milliseconds. Default value is 7 days ago.
todatetimeOptional
Unix timestamp in milliseconds. Default value is now.
afterstringOptionalformat: "string"
Identifier used for pagination
beforestringOptionalformat: "string"
Identifier used for pagination

Response

Pull request collection response
totalCountinteger
The total number of pull requests
itemslist of objects
A list of pull requests
_linksmap from strings to objects
The location and content type of related resources

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
429
Too Many Requests Error