Insights repositories (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.

Engineering insights automatically creates repository associations when it receives deployments or code references. Optionally, you can manually configure additional associations. You can use the repositories API to list repositories and create associations to projects. To learn more, read Send deployment information.

List repositories

Get a list of repositories

Expanding the repository collection response

LaunchDarkly supports expanding the repository collection response to include additional fields.

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

  • projects includes details on all of the LaunchDarkly projects associated with each repository

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

Request
query Parameters
expand
string <string>

Expand properties in response. Options: projects

Responses
200

Repository collection response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

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

Associate repositories with projects

Associate repositories with projects

Request
Request Body schema: application/json
required
required
Array of objects (InsightsRepositoryProject)
Responses
200

Repositories projects response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

put/api/v2/engineering-insights/repositories/projects
Request samples
application/json
{
  • "mappings": [
    ]
}
Response samples
application/json
{
  • "totalCount": 1,
  • "items": [
    ],
  • "_links": {
    }
}

Remove repository project association

Remove repository project association

Request
path Parameters
repositoryKey
required
string <string>

The repository key

projectKey
required
string <string>

The project key

Responses
204

Action succeeded

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/engineering-insights/repositories/{repositoryKey}/projects/{projectKey}
Request samples
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "validation failed",
  • "errors": [
    ]
}