Insights pull requests (beta)

This feature is in beta

To use this feature, pass in a header including the LD-API-Version key with value set to beta. Use this header with each call. To learn more, read Beta resources.

Resources that are in beta are still undergoing testing and development. They may change without notice, including becoming backwards incompatible.

The pull requests API provides access to information used for lead time calculations. To learn more, read Lead time.

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.

Request
query Parameters
projectKey
required
string <string>

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

Responses
200

Pull request collection response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/engineering-insights/pull-requests
Request samples
Response samples
application/json
{
  • "totalCount": 25,
  • "items": [
    ],
  • "_links": {
    }
}