Show an AI Config's targeting
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting \
--header 'Authorization: <api-key>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting', 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/projects/{projectKey}/ai-configs/{configKey}/targeting",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"defaults": {
"onVariation": 6,
"offVariation": 1
},
"environments": {
"key": {
"trackEventsFallthrough": true,
"_environmentName": "_environmentName",
"contextTargets": [
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
},
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
}
],
"rules": [
{
"clauses": [
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
},
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
}
],
"trackEvents": true
},
{
"clauses": [
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
},
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
}
],
"trackEvents": true
}
],
"lastModified": 2,
"trackEvents": true,
"fallthrough": {
"rollout": {
"experimentAllocation": {
"defaultVariation": 2,
"canReshuffle": true,
"type": "type"
},
"seed": 7,
"variations": [
{
"weight": 3,
"_untracked": true,
"variation": 9
},
{
"weight": 3,
"_untracked": true,
"variation": 9
}
],
"contextKind": "contextKind",
"bucketBy": "bucketBy"
},
"variation": 5
},
"offVariation": 4,
"targets": [
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
},
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
}
],
"_version": 7,
"enabled": true
}
},
"variations": [
{
"name": "name",
"description": "description",
"_id": "_id",
"value": null
},
{
"name": "name",
"description": "description",
"_id": "_id",
"value": null
}
],
"experiments": {
"baselineIdx": 1,
"items": [
{
"metricKey": "my-metric",
"environments": [
"production",
"test",
"my-environment"
],
"_environmentSettings": {
"key": {
"startDate": 6,
"stopDate": 8,
"enabledPeriods": [
{
"startDate": 9,
"stopDate": 6
},
{
"startDate": 9,
"stopDate": 6
}
]
}
},
"_metric": {
"_links": {
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"activeExperimentCount": 2,
"windowEndOffset": 1,
"randomizationUnits": [
"user"
],
"guardedRolloutCount": 0,
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_version": 1,
"unitAggregationField": "unitAggregationField",
"percentileValue": 95,
"traceQuery": "service.name = \"checkout\"",
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
"_creationDate": 1,
"windowStartOffset": 7,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
"isNumeric": true,
"valueColumn": "valueColumn",
"eventName": "eventName",
"unitAggregationType": "unitAggregationType",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"unitAggregationField": "unitAggregationField",
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"windowStartOffset": 4,
"windowEndOffset": 5,
"winsorLowerPercentile": 9.965781217890562,
"winsorUpperPercentile": 9.369310271410669,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
"lastSeen": 1,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
"_id": "5902deadbeef667524a01290",
"lastModified": {
"date": "2021-08-05T19:46:31.148Z"
},
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"winsorUpperPercentile": 99.5,
"_maintainer": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"description": "description",
"activeGuardedRolloutCount": 1,
"archived": true,
"urls": [
null,
null
],
"_site": {
"href": "href",
"type": "type"
},
"analysisUnits": [
"user"
],
"selector": "selector",
"winsorLowerPercentile": 1,
"key": "metric-key-123abc",
"traceValueLocation": "duration",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"eventDefault": {
"disabled": true,
"value": 0
},
"archivedAt": 6,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"eventKey": "Order placed",
"unitAggregationType": "average",
"category": "Error monitoring",
"analysisType": "mean"
}
},
{
"metricKey": "my-metric",
"environments": [
"production",
"test",
"my-environment"
],
"_environmentSettings": {
"key": {
"startDate": 6,
"stopDate": 8,
"enabledPeriods": [
{
"startDate": 9,
"stopDate": 6
},
{
"startDate": 9,
"stopDate": 6
}
]
}
},
"_metric": {
"_links": {
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"activeExperimentCount": 2,
"windowEndOffset": 1,
"randomizationUnits": [
"user"
],
"guardedRolloutCount": 0,
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_version": 1,
"unitAggregationField": "unitAggregationField",
"percentileValue": 95,
"traceQuery": "service.name = \"checkout\"",
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
"_creationDate": 1,
"windowStartOffset": 7,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
"isNumeric": true,
"valueColumn": "valueColumn",
"eventName": "eventName",
"unitAggregationType": "unitAggregationType",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"unitAggregationField": "unitAggregationField",
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"windowStartOffset": 4,
"windowEndOffset": 5,
"winsorLowerPercentile": 9.965781217890562,
"winsorUpperPercentile": 9.369310271410669,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
"lastSeen": 1,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
"_id": "5902deadbeef667524a01290",
"lastModified": {
"date": "2021-08-05T19:46:31.148Z"
},
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"winsorUpperPercentile": 99.5,
"_maintainer": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"description": "description",
"activeGuardedRolloutCount": 1,
"archived": true,
"urls": [
null,
null
],
"_site": {
"href": "href",
"type": "type"
},
"analysisUnits": [
"user"
],
"selector": "selector",
"winsorLowerPercentile": 1,
"key": "metric-key-123abc",
"traceValueLocation": "duration",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"eventDefault": {
"disabled": true,
"value": 0
},
"archivedAt": 6,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"eventKey": "Order placed",
"unitAggregationType": "average",
"category": "Error monitoring",
"analysisType": "mean"
}
}
]
},
"name": "name",
"_version": 3,
"key": "key",
"tags": [
"tags",
"tags"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Show an AI Config's targeting
Retrieves a specific AI Config’s targeting by its key
GET
/
api
/
v2
/
projects
/
{projectKey}
/
ai-configs
/
{configKey}
/
targeting
Show an AI Config's targeting
curl --request GET \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting \
--header 'Authorization: <api-key>'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting', 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/projects/{projectKey}/ai-configs/{configKey}/targeting",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/ai-configs/{configKey}/targeting")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"createdAt": 0,
"defaults": {
"onVariation": 6,
"offVariation": 1
},
"environments": {
"key": {
"trackEventsFallthrough": true,
"_environmentName": "_environmentName",
"contextTargets": [
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
},
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
}
],
"rules": [
{
"clauses": [
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
},
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
}
],
"trackEvents": true
},
{
"clauses": [
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
},
{
"op": "op",
"negate": true,
"values": [
"",
""
],
"attribute": "attribute",
"id": "id"
}
],
"trackEvents": true
}
],
"lastModified": 2,
"trackEvents": true,
"fallthrough": {
"rollout": {
"experimentAllocation": {
"defaultVariation": 2,
"canReshuffle": true,
"type": "type"
},
"seed": 7,
"variations": [
{
"weight": 3,
"_untracked": true,
"variation": 9
},
{
"weight": 3,
"_untracked": true,
"variation": 9
}
],
"contextKind": "contextKind",
"bucketBy": "bucketBy"
},
"variation": 5
},
"offVariation": 4,
"targets": [
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
},
{
"values": [
"values",
"values"
],
"contextKind": "contextKind",
"variation": 5
}
],
"_version": 7,
"enabled": true
}
},
"variations": [
{
"name": "name",
"description": "description",
"_id": "_id",
"value": null
},
{
"name": "name",
"description": "description",
"_id": "_id",
"value": null
}
],
"experiments": {
"baselineIdx": 1,
"items": [
{
"metricKey": "my-metric",
"environments": [
"production",
"test",
"my-environment"
],
"_environmentSettings": {
"key": {
"startDate": 6,
"stopDate": 8,
"enabledPeriods": [
{
"startDate": 9,
"stopDate": 6
},
{
"startDate": 9,
"stopDate": 6
}
]
}
},
"_metric": {
"_links": {
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"activeExperimentCount": 2,
"windowEndOffset": 1,
"randomizationUnits": [
"user"
],
"guardedRolloutCount": 0,
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_version": 1,
"unitAggregationField": "unitAggregationField",
"percentileValue": 95,
"traceQuery": "service.name = \"checkout\"",
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
"_creationDate": 1,
"windowStartOffset": 7,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
"isNumeric": true,
"valueColumn": "valueColumn",
"eventName": "eventName",
"unitAggregationType": "unitAggregationType",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"unitAggregationField": "unitAggregationField",
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"windowStartOffset": 4,
"windowEndOffset": 5,
"winsorLowerPercentile": 9.965781217890562,
"winsorUpperPercentile": 9.369310271410669,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
"lastSeen": 1,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
"_id": "5902deadbeef667524a01290",
"lastModified": {
"date": "2021-08-05T19:46:31.148Z"
},
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"winsorUpperPercentile": 99.5,
"_maintainer": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"description": "description",
"activeGuardedRolloutCount": 1,
"archived": true,
"urls": [
null,
null
],
"_site": {
"href": "href",
"type": "type"
},
"analysisUnits": [
"user"
],
"selector": "selector",
"winsorLowerPercentile": 1,
"key": "metric-key-123abc",
"traceValueLocation": "duration",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"eventDefault": {
"disabled": true,
"value": 0
},
"archivedAt": 6,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"eventKey": "Order placed",
"unitAggregationType": "average",
"category": "Error monitoring",
"analysisType": "mean"
}
},
{
"metricKey": "my-metric",
"environments": [
"production",
"test",
"my-environment"
],
"_environmentSettings": {
"key": {
"startDate": 6,
"stopDate": 8,
"enabledPeriods": [
{
"startDate": 9,
"stopDate": 6
},
{
"startDate": 9,
"stopDate": 6
}
]
}
},
"_metric": {
"_links": {
"parent": {
"href": "/api/v2/metrics/my-project",
"type": "application/json"
},
"self": {
"href": "/api/v2/metrics/my-project/my-metric",
"type": "application/json"
}
},
"activeExperimentCount": 2,
"windowEndOffset": 1,
"randomizationUnits": [
"user"
],
"guardedRolloutCount": 0,
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"_version": 1,
"unitAggregationField": "unitAggregationField",
"percentileValue": 95,
"traceQuery": "service.name = \"checkout\"",
"kind": "custom",
"_attachedFlagCount": 0,
"metricGroupCount": 0,
"_creationDate": 1,
"windowStartOffset": 7,
"tags": [],
"winsorIncludeImputed": false,
"denominator": {
"isNumeric": true,
"valueColumn": "valueColumn",
"eventName": "eventName",
"unitAggregationType": "unitAggregationType",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"unitAggregationField": "unitAggregationField",
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"windowStartOffset": 4,
"windowEndOffset": 5,
"winsorLowerPercentile": 9.965781217890562,
"winsorUpperPercentile": 9.369310271410669,
"winsorIncludeImputed": true
},
"maintainerId": "569fdeadbeef1644facecafe",
"unit": "unit",
"lastSeen": 1,
"isNumeric": true,
"experimentCount": 0,
"name": "My metric",
"_id": "5902deadbeef667524a01290",
"lastModified": {
"date": "2021-08-05T19:46:31.148Z"
},
"dataSource": {
"_name": "_name",
"_integrationKey": "_integrationKey",
"key": "key",
"environmentKey": "environmentKey"
},
"winsorUpperPercentile": 99.5,
"_maintainer": {
"firstName": "Ariel",
"lastName": "Flores",
"role": "admin",
"_links": {
"self": {
"href": "/api/v2/members/569f183514f4432160000007",
"type": "application/json"
}
},
"_id": "569f183514f4432160000007",
"email": "ariel@acme.com"
},
"description": "description",
"activeGuardedRolloutCount": 1,
"archived": true,
"urls": [
null,
null
],
"_site": {
"href": "href",
"type": "type"
},
"analysisUnits": [
"user"
],
"selector": "selector",
"winsorLowerPercentile": 1,
"key": "metric-key-123abc",
"traceValueLocation": "duration",
"filters": {
"op": "op",
"negate": false,
"values": [
"JP"
],
"contextKind": "user",
"attribute": "country",
"type": "contextAttribute"
},
"eventDefault": {
"disabled": true,
"value": 0
},
"archivedAt": 6,
"successCriteria": "HigherThanBaseline",
"releasePolicyCount": 0,
"_versionId": "version-id-123abc",
"eventKey": "Order placed",
"unitAggregationType": "average",
"category": "Error monitoring",
"analysisType": "mean"
}
}
]
},
"name": "name",
"_version": 3,
"key": "key",
"tags": [
"tags",
"tags"
]
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Response
Successful response
Unix timestamp in milliseconds
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{ "baselineIdx": 1, "items": [ { "metricKey": "my-metric", "environments": ["production", "test", "my-environment"], "_environmentSettings": { "key": { "startDate": 6, "stopDate": 8, "enabledPeriods": [ { "startDate": 9, "stopDate": 6 }, { "startDate": 9, "stopDate": 6 } ] } }, "_metric": { "_links": { "parent": { "href": "/api/v2/metrics/my-project", "type": "application/json" }, "self": { "href": "/api/v2/metrics/my-project/my-metric", "type": "application/json" } }, "activeExperimentCount": 2, "windowEndOffset": 1, "randomizationUnits": ["user"], "guardedRolloutCount": 0, "_access": { "allowed": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ], "denied": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ] }, "_version": 1, "unitAggregationField": "unitAggregationField", "percentileValue": 95, "traceQuery": "service.name = \"checkout\"", "kind": "custom", "_attachedFlagCount": 0, "metricGroupCount": 0, "_creationDate": 1, "windowStartOffset": 7, "tags": [], "winsorIncludeImputed": false, "denominator": { "isNumeric": true, "valueColumn": "valueColumn", "eventName": "eventName", "unitAggregationType": "unitAggregationType", "filters": { "op": "op", "negate": false, "values": ["JP"], "contextKind": "user", "attribute": "country", "type": "contextAttribute" }, "unitAggregationField": "unitAggregationField", "dataSource": { "_name": "_name", "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" }, "windowStartOffset": 4, "windowEndOffset": 5, "winsorLowerPercentile": 9.965781217890562, "winsorUpperPercentile": 9.369310271410669, "winsorIncludeImputed": true }, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "lastSeen": 1, "isNumeric": true, "experimentCount": 0, "name": "My metric", "_id": "5902deadbeef667524a01290", "lastModified": { "date": "2021-08-05T19:46:31.148Z" }, "dataSource": { "_name": "_name", "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" }, "winsorUpperPercentile": 99.5, "_maintainer": { "firstName": "Ariel", "lastName": "Flores", "role": "admin", "_links": { "self": { "href": "/api/v2/members/569f183514f4432160000007", "type": "application/json" } }, "_id": "569f183514f4432160000007", "email": "ariel@acme.com" }, "description": "description", "activeGuardedRolloutCount": 1, "archived": true, "urls": [null, null], "_site": { "href": "href", "type": "type" }, "analysisUnits": ["user"], "selector": "selector", "winsorLowerPercentile": 1, "key": "metric-key-123abc", "traceValueLocation": "duration", "filters": { "op": "op", "negate": false, "values": ["JP"], "contextKind": "user", "attribute": "country", "type": "contextAttribute" }, "eventDefault": { "disabled": true, "value": 0 }, "archivedAt": 6, "successCriteria": "HigherThanBaseline", "releasePolicyCount": 0, "_versionId": "version-id-123abc", "eventKey": "Order placed", "unitAggregationType": "average", "category": "Error monitoring", "analysisType": "mean" } }, { "metricKey": "my-metric", "environments": ["production", "test", "my-environment"], "_environmentSettings": { "key": { "startDate": 6, "stopDate": 8, "enabledPeriods": [ { "startDate": 9, "stopDate": 6 }, { "startDate": 9, "stopDate": 6 } ] } }, "_metric": { "_links": { "parent": { "href": "/api/v2/metrics/my-project", "type": "application/json" }, "self": { "href": "/api/v2/metrics/my-project/my-metric", "type": "application/json" } }, "activeExperimentCount": 2, "windowEndOffset": 1, "randomizationUnits": ["user"], "guardedRolloutCount": 0, "_access": { "allowed": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ], "denied": [ { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" }, { "reason": { "role_name": "role_name", "notActions": [null, null], "notResources": ["notResources", "notResources"], "effect": "allow", "resources": ["proj/*:env/*;qa_*:/flag/*"], "actions": ["*"] }, "action": "action" } ] }, "_version": 1, "unitAggregationField": "unitAggregationField", "percentileValue": 95, "traceQuery": "service.name = \"checkout\"", "kind": "custom", "_attachedFlagCount": 0, "metricGroupCount": 0, "_creationDate": 1, "windowStartOffset": 7, "tags": [], "winsorIncludeImputed": false, "denominator": { "isNumeric": true, "valueColumn": "valueColumn", "eventName": "eventName", "unitAggregationType": "unitAggregationType", "filters": { "op": "op", "negate": false, "values": ["JP"], "contextKind": "user", "attribute": "country", "type": "contextAttribute" }, "unitAggregationField": "unitAggregationField", "dataSource": { "_name": "_name", "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" }, "windowStartOffset": 4, "windowEndOffset": 5, "winsorLowerPercentile": 9.965781217890562, "winsorUpperPercentile": 9.369310271410669, "winsorIncludeImputed": true }, "maintainerId": "569fdeadbeef1644facecafe", "unit": "unit", "lastSeen": 1, "isNumeric": true, "experimentCount": 0, "name": "My metric", "_id": "5902deadbeef667524a01290", "lastModified": { "date": "2021-08-05T19:46:31.148Z" }, "dataSource": { "_name": "_name", "_integrationKey": "_integrationKey", "key": "key", "environmentKey": "environmentKey" }, "winsorUpperPercentile": 99.5, "_maintainer": { "firstName": "Ariel", "lastName": "Flores", "role": "admin", "_links": { "self": { "href": "/api/v2/members/569f183514f4432160000007", "type": "application/json" } }, "_id": "569f183514f4432160000007", "email": "ariel@acme.com" }, "description": "description", "activeGuardedRolloutCount": 1, "archived": true, "urls": [null, null], "_site": { "href": "href", "type": "type" }, "analysisUnits": ["user"], "selector": "selector", "winsorLowerPercentile": 1, "key": "metric-key-123abc", "traceValueLocation": "duration", "filters": { "op": "op", "negate": false, "values": ["JP"], "contextKind": "user", "attribute": "country", "type": "contextAttribute" }, "eventDefault": { "disabled": true, "value": 0 }, "archivedAt": 6, "successCriteria": "HigherThanBaseline", "releasePolicyCount": 0, "_versionId": "version-id-123abc", "eventKey": "Order placed", "unitAggregationType": "average", "category": "Error monitoring", "analysisType": "mean" } } ] }
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
{ "onVariation": 6, "offVariation": 1 }