Create insight group
For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
Create insight group
curl --request POST \
--url https://app.launchdarkly.com/api/v2/engineering-insights/insights/group \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Production - All Apps",
"key": "default-production-all-apps",
"projectKey": "default",
"environmentKey": "production",
"applicationKeys": [
"billing-service",
"inventory-service"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group"
payload = {
"name": "Production - All Apps",
"key": "default-production-all-apps",
"projectKey": "default",
"environmentKey": "production",
"applicationKeys": ["billing-service", "inventory-service"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production - All Apps',
key: 'default-production-all-apps',
projectKey: 'default',
environmentKey: 'production',
applicationKeys: ['billing-service', 'inventory-service']
})
};
fetch('https://app.launchdarkly.com/api/v2/engineering-insights/insights/group', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Production - All Apps',
'key' => 'default-production-all-apps',
'projectKey' => 'default',
'environmentKey' => 'production',
'applicationKeys' => [
'billing-service',
'inventory-service'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group"
payload := strings.NewReader("{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.launchdarkly.com/api/v2/engineering-insights/insights/group")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/engineering-insights/insights/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"key": "default-production-all-apps",
"name": "Production - All Apps",
"projectKey": "default",
"environmentKey": "production",
"createdAt": "1706701522000",
"environment": {
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"_id": "57be1db38b75bf0772d11384",
"key": "environment-key-123abc",
"name": "My Environment",
"apiKey": "sdk-xxx",
"mobileKey": "mob-xxx",
"color": "F5A623",
"defaultTtl": 5,
"secureMode": true,
"defaultTrackEvents": false,
"requireComments": true,
"confirmChanges": true,
"tags": [
"ops"
],
"critical": true,
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"approvalSettings": {
"required": true,
"bypassApprovalsForPendingChanges": false,
"minNumApprovals": 1,
"canReviewOwnRequest": false,
"canApplyDeclinedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": [
"require-approval"
],
"autoApplyApprovedChanges": true,
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
},
"resourceApprovalSettings": {}
},
"scores": {
"overall": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"deploymentFrequency": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"deploymentFailureRate": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"leadTime": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"impactSize": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"experimentationCoverage": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"flagHealth": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"velocity": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"risk": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"efficiency": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"creationRatio": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
}
},
"scoreMetadata": {
"period": {
"startTime": "1706701522000",
"endTime": "1706701522000"
},
"lastPeriod": {
"startTime": "1706701522000",
"endTime": "1706701522000"
}
},
"applicationKeys": [
"billing-service",
"inventory-service"
]
}{
"code": "invalid_request",
"message": "validation failed",
"errors": [
{
"attribute": "projectKey",
"reason": "must be present"
}
]
}{
"code": "unauthorized",
"message": "Invalid access token"
}{
"code": "forbidden",
"message": "Forbidden. Access to the requested resource was denied."
}{
"code": "not_found",
"message": "Invalid resource identifier"
}{
"code": "optimistic_locking_error",
"message": "Conflict. Optimistic lock error. Try again later."
}{
"code": "rate_limited",
"message": "You've exceeded the API rate limit. Try again later."
}Authorizations
Body
The name of the insight group
"Production - All Apps"
The key of the insight group
"default-production-all-apps"
The projectKey to be associated with the insight group
"default"
The environmentKey to be associated with the insight group
"production"
The application keys to associate with the insight group. If not provided, the insight group will include data from all applications.
["billing-service", "inventory-service"]
Response
Created
The insight group key
"default-production-all-apps"
The insight group name
"Production - All Apps"
The project key
"default"
The environment key
"production"
The time the insight group was created
"1706701522000"
Expanded details about the environment
Show child attributes
Show child attributes
The scores for the insight group
Show child attributes
Show child attributes
Metadata about the insight scores, when expanded
Show child attributes
Show child attributes
The application keys
["billing-service", "inventory-service"]
curl --request POST \
--url https://app.launchdarkly.com/api/v2/engineering-insights/insights/group \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Production - All Apps",
"key": "default-production-all-apps",
"projectKey": "default",
"environmentKey": "production",
"applicationKeys": [
"billing-service",
"inventory-service"
]
}
'import requests
url = "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group"
payload = {
"name": "Production - All Apps",
"key": "default-production-all-apps",
"projectKey": "default",
"environmentKey": "production",
"applicationKeys": ["billing-service", "inventory-service"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Production - All Apps',
key: 'default-production-all-apps',
projectKey: 'default',
environmentKey: 'production',
applicationKeys: ['billing-service', 'inventory-service']
})
};
fetch('https://app.launchdarkly.com/api/v2/engineering-insights/insights/group', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Production - All Apps',
'key' => 'default-production-all-apps',
'projectKey' => 'default',
'environmentKey' => 'production',
'applicationKeys' => [
'billing-service',
'inventory-service'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/engineering-insights/insights/group"
payload := strings.NewReader("{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.launchdarkly.com/api/v2/engineering-insights/insights/group")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/engineering-insights/insights/group")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Production - All Apps\",\n \"key\": \"default-production-all-apps\",\n \"projectKey\": \"default\",\n \"environmentKey\": \"production\",\n \"applicationKeys\": [\n \"billing-service\",\n \"inventory-service\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"key": "default-production-all-apps",
"name": "Production - All Apps",
"projectKey": "default",
"environmentKey": "production",
"createdAt": "1706701522000",
"environment": {
"_links": {
"self": {
"href": "/api/v2/projects/my-project/environments/my-environment",
"type": "application/json"
}
},
"_id": "57be1db38b75bf0772d11384",
"key": "environment-key-123abc",
"name": "My Environment",
"apiKey": "sdk-xxx",
"mobileKey": "mob-xxx",
"color": "F5A623",
"defaultTtl": 5,
"secureMode": true,
"defaultTrackEvents": false,
"requireComments": true,
"confirmChanges": true,
"tags": [
"ops"
],
"critical": true,
"_access": {
"denied": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
],
"allowed": [
{
"action": "<string>",
"reason": {
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"notResources": [
"<string>"
],
"actions": [
"*"
],
"notActions": [
"<string>"
],
"role_name": "<string>"
}
}
]
},
"approvalSettings": {
"required": true,
"bypassApprovalsForPendingChanges": false,
"minNumApprovals": 1,
"canReviewOwnRequest": false,
"canApplyDeclinedChanges": true,
"serviceKind": "launchdarkly",
"serviceConfig": {},
"requiredApprovalTags": [
"require-approval"
],
"autoApplyApprovedChanges": true,
"serviceKindConfigurationId": "1ef45a85-218f-4428-a8b2-a97e5f56c258"
},
"resourceApprovalSettings": {}
},
"scores": {
"overall": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"deploymentFrequency": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"deploymentFailureRate": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"leadTime": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"impactSize": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"experimentationCoverage": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"flagHealth": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"velocity": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"risk": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"efficiency": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
},
"creationRatio": {
"score": 100,
"indicator": "excellent",
"indicatorRange": {
"min": 0,
"max": 100
},
"aggregateOf": [
"deploymentFrequency",
"leadTime"
],
"diffVsLastPeriod": 123,
"lastPeriod": "<unknown>"
}
},
"scoreMetadata": {
"period": {
"startTime": "1706701522000",
"endTime": "1706701522000"
},
"lastPeriod": {
"startTime": "1706701522000",
"endTime": "1706701522000"
}
},
"applicationKeys": [
"billing-service",
"inventory-service"
]
}{
"code": "invalid_request",
"message": "validation failed",
"errors": [
{
"attribute": "projectKey",
"reason": "must be present"
}
]
}{
"code": "unauthorized",
"message": "Invalid access token"
}{
"code": "forbidden",
"message": "Forbidden. Access to the requested resource was denied."
}{
"code": "not_found",
"message": "Invalid resource identifier"
}{
"code": "optimistic_locking_error",
"message": "Conflict. Optimistic lock error. Try again later."
}{
"code": "rate_limited",
"message": "You've exceeded the API rate limit. Try again later."
}