Insights scores (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 insights scores API provides scores for data used in engineering insights project metrics. To learn more, read Project overview and Project metrics.

Create insight group

Create insight group

Request
Request Body schema: application/json
required
name
required
string

The name of the insight group

key
required
string

The key of the insight group

projectKey
required
string

The projectKey to be associated with the insight group

environmentKey
required
string

The environmentKey to be associated with the insight group

applicationKeys
Array of strings

The application keys to associate with the insight group. If not provided, the insight group will include data from all applications.

Responses
201

Created

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

409

Status conflict

429

Rate limited

post/api/v2/engineering-insights/insights/group
Request samples
application/json
{
  • "name": "Production - All Apps",
  • "key": "default-production-all-apps",
  • "projectKey": "default",
  • "environmentKey": "production",
  • "applicationKeys": [
    ]
}
Response samples
application/json
{
  • "environment": {
    },
  • "scores": {
    },
  • "scoreMetadata": {
    },
  • "key": "default-production-all-apps",
  • "name": "Production - All Apps",
  • "projectKey": "default",
  • "environmentKey": "production",
  • "applicationKeys": [
    ],
  • "createdAt": 0
}

List insight groups

List groups for which you are collecting insights

Expanding the insight groups collection response

LaunchDarkly supports expanding the insight groups collection response to include additional fields.

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

  • scores includes details on all of the scores used in the engineering insights metrics views for each group
  • environment includes details on each environment associated with each group
  • metadata includes counts of the number of insight groups with particular indicators, such as "execellent," "good," "fair," and so on.

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

Request
query Parameters
limit
integer <int64>

The number of insight groups to return. Default is 20. Must be between 1 and 20 inclusive.

offset
integer <int64>

Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query limit.

sort
string <string>

Sort flag list by field. Prefix field with - to sort in descending order. Allowed fields: name

query
string <string>

Filter list of insights groups by name.

expand
string <string>

Options: scores, environment, metadata

Responses
200

Insight groups collection response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/engineering-insights/insights/groups
Request samples
Response samples
application/json
{
  • "totalCount": 15,
  • "items": [
    ],
  • "_links": {
    },
  • "metadata": {
    },
  • "scoreMetadata": {
    }
}

Get insight group

Get insight group

Expanding the insight group response

LaunchDarkly supports expanding the insight group response to include additional fields.

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

  • scores includes details on all of the scores used in the engineering insights metrics views for this group
  • environment includes details on each environment associated with this group

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

Request
path Parameters
insightGroupKey
required
string <string>

The insight group key

query Parameters
expand
string <string>

Options: scores, environment

Responses
200

Insight group response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/engineering-insights/insights/groups/{insightGroupKey}
Request samples
Response samples
application/json
{
  • "environment": {
    },
  • "scores": {
    },
  • "scoreMetadata": {
    },
  • "key": "default-production-all-apps",
  • "name": "Production - All Apps",
  • "projectKey": "default",
  • "environmentKey": "production",
  • "applicationKeys": [
    ],
  • "createdAt": 0
}

Patch insight group

Update an insight group. Updating an insight group uses a JSON patch representation of the desired changes. To learn more, read Updates.

Request
path Parameters
insightGroupKey
required
string <string>

The insight group key

Request Body schema: application/json
required
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Insight group response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

422

Invalid patch content

429

Rate limited

patch/api/v2/engineering-insights/insights/groups/{insightGroupKey}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "environment": {
    },
  • "scores": {
    },
  • "scoreMetadata": {
    },
  • "key": "default-production-all-apps",
  • "name": "Production - All Apps",
  • "projectKey": "default",
  • "environmentKey": "production",
  • "applicationKeys": [
    ],
  • "createdAt": 0
}

Delete insight group

Delete insight group

Request
path Parameters
insightGroupKey
required
string <string>

The insight group 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/insights/groups/{insightGroupKey}
Request samples
Response samples
application/json
{
  • "code": "invalid_request",
  • "message": "validation failed",
  • "errors": [
    ]
}

Get insight scores

Return insights scores, based on the given parameters. This data is also used in engineering insights metrics views.

Request
query Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

applicationKey
string <string>

Comma separated list of application keys

Responses
200

Insight score response

400

Invalid request

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/engineering-insights/insights/scores
Request samples
Response samples
application/json
{
  • "period": {
    },
  • "lastPeriod": {
    },
  • "scores": {
    },
  • "_links": {
    }
}