provider Insights pull requests (beta) GET
/api/v2/engineering-insights/pull-requests @utdk/launchdarkly
/api/v2/engineering-insights/pull-requests List pull requests
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.
- projectKey query required
- The project key
- string
- environmentKey query
- Required if you are using the <code>sort</code> parameter's <code>leadTime</code> option to sort pull requests.
- string
- applicationKey query
- Filter the results to pull requests deployed to a comma separated list of applications
- string
- status query
- Filter results to pull requests with the given status. Options: `open`, `merged`, `closed`, `deployed`.
- string
- query query
- Filter list of pull requests by title or author
- string
- limit query
- The number of pull requests to return. Default is 20. Maximum allowed is 100.
- integer
- expand query
- Expand properties in response. Options: `deployments`, `flagReferences`, `leadTime`.
- string
- sort query
- 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.
- string
- from query
- Unix timestamp in milliseconds. Default value is 7 days ago.
- string
- to query
- Unix timestamp in milliseconds. Default value is now.
- string
- after query
- Identifier used for pagination
- string
- before query
- Identifier used for pagination
- string
Try it
Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.
Saved automatically to browser storage.
Code snippet
Updates live as you fill in the form above.
TypeScript
import launchdarkly from '@utdk/launchdarkly';
await launchdarkly.getpullrequests()