Lineage: List experiments related to Metric
curl --request GET \
--url https://statsigapi.net/console/v1/metrics/{id}/experiments \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/metrics/{id}/experiments"
headers = {"STATSIG-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'STATSIG-API-KEY': '<api-key>'}};
fetch('https://statsigapi.net/console/v1/metrics/{id}/experiments', 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://statsigapi.net/console/v1/metrics/{id}/experiments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"STATSIG-API-KEY: <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://statsigapi.net/console/v1/metrics/{id}/experiments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("STATSIG-API-KEY", "<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://statsigapi.net/console/v1/metrics/{id}/experiments")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/metrics/{id}/experiments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Metrics listed successfully.",
"data": [
{
"id": " ::sum",
"name": " ",
"directionality": "increase",
"type": "sum",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709580516933,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart"
],
"metrics": []
},
"team": "test",
"unitTypes": [
"room_id"
],
"metricEvents": [
{
"name": "add_to_cart",
"type": "value",
"criteria": []
}
]
},
{
"id": " ::ratio",
"name": " ",
"directionality": "increase",
"type": "ratio",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709580027061,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart",
"."
],
"metrics": []
},
"team": "test",
"unitTypes": [
"namespace_id"
],
"metricEvents": [
{
"name": "add_to_cart",
"type": "count",
"criteria": []
},
{
"name": ".",
"type": "count",
"criteria": []
}
]
},
{
"id": "[LOCAL] Time Spent over 500ms::event_count_custom",
"name": "[LOCAL] Time Spent over 500ms",
"directionality": "increase",
"type": "event_count_custom",
"description": "Creating my first Local Metric! How exciting!! ",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [
"★ Core",
"dashboard_test",
"test_owner_4"
],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709594132514,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"time_spent_on_page"
],
"metrics": []
},
"team": null,
"unitTypes": [
"userID"
],
"metricEvents": [
{
"name": "time_spent_on_page",
"criteria": [
{
"type": "value",
"column": "!statsig_value",
"condition": ">",
"values": [
"500"
]
}
]
}
]
},
{
"id": "___RENAME_FAILED___::composite_sum",
"name": "rename_test_success",
"directionality": "increase",
"type": "composite_sum",
"description": "This metric will be renamed from something aggressive and capital, to \"rename_test_success\", to help determine where metric renaming worked",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [
"dashboard_test"
],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1704923273872,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [],
"metrics": [
"add_to_cart_games::event_count_custom",
"Appliance Purchases::event_count_custom",
"test-test::event_count_custom"
]
},
"team": null,
"unitTypes": [
"userID",
"stableID",
"room_id",
"server_id"
],
"metricEvents": [],
"metricComponentMetrics": [
{
"name": "add_to_cart_games",
"type": "event_count_custom"
},
{
"name": "Appliance Purchases",
"type": "event_count_custom"
},
{
"name": "Test User",
"type": "event_count_custom"
}
]
},
{
"id": "A metric for testing teams::event_count_custom",
"name": "A metric for testing teams",
"directionality": "increase",
"type": "event_count_custom",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1706640947812,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart"
],
"metrics": []
},
"team": null,
"unitTypes": [
"userID"
],
"metricEvents": [
{
"name": "add_to_cart",
"criteria": [
{
"type": "value",
"column": "",
"condition": "in",
"values": [
"sports"
]
}
]
}
]
}
],
"pagination": {
"itemsPerPage": 5,
"pageNumber": 1,
"totalItems": 2699,
"nextPage": "/console/v1/metrics/list?page=2&limit=5",
"previousPage": null,
"all": "/console/v1/metrics/list"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Metrics
Lineage: List experiments related to Metric
GET
/
console
/
v1
/
metrics
/
{id}
/
experiments
Lineage: List experiments related to Metric
curl --request GET \
--url https://statsigapi.net/console/v1/metrics/{id}/experiments \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/metrics/{id}/experiments"
headers = {"STATSIG-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'STATSIG-API-KEY': '<api-key>'}};
fetch('https://statsigapi.net/console/v1/metrics/{id}/experiments', 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://statsigapi.net/console/v1/metrics/{id}/experiments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"STATSIG-API-KEY: <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://statsigapi.net/console/v1/metrics/{id}/experiments"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("STATSIG-API-KEY", "<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://statsigapi.net/console/v1/metrics/{id}/experiments")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/metrics/{id}/experiments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Metrics listed successfully.",
"data": [
{
"id": " ::sum",
"name": " ",
"directionality": "increase",
"type": "sum",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709580516933,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart"
],
"metrics": []
},
"team": "test",
"unitTypes": [
"room_id"
],
"metricEvents": [
{
"name": "add_to_cart",
"type": "value",
"criteria": []
}
]
},
{
"id": " ::ratio",
"name": " ",
"directionality": "increase",
"type": "ratio",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709580027061,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart",
"."
],
"metrics": []
},
"team": "test",
"unitTypes": [
"namespace_id"
],
"metricEvents": [
{
"name": "add_to_cart",
"type": "count",
"criteria": []
},
{
"name": ".",
"type": "count",
"criteria": []
}
]
},
{
"id": "[LOCAL] Time Spent over 500ms::event_count_custom",
"name": "[LOCAL] Time Spent over 500ms",
"directionality": "increase",
"type": "event_count_custom",
"description": "Creating my first Local Metric! How exciting!! ",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [
"★ Core",
"dashboard_test",
"test_owner_4"
],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1709594132514,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"time_spent_on_page"
],
"metrics": []
},
"team": null,
"unitTypes": [
"userID"
],
"metricEvents": [
{
"name": "time_spent_on_page",
"criteria": [
{
"type": "value",
"column": "!statsig_value",
"condition": ">",
"values": [
"500"
]
}
]
}
]
},
{
"id": "___RENAME_FAILED___::composite_sum",
"name": "rename_test_success",
"directionality": "increase",
"type": "composite_sum",
"description": "This metric will be renamed from something aggressive and capital, to \"rename_test_success\", to help determine where metric renaming worked",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [
"dashboard_test"
],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1704923273872,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [],
"metrics": [
"add_to_cart_games::event_count_custom",
"Appliance Purchases::event_count_custom",
"test-test::event_count_custom"
]
},
"team": null,
"unitTypes": [
"userID",
"stableID",
"room_id",
"server_id"
],
"metricEvents": [],
"metricComponentMetrics": [
{
"name": "add_to_cart_games",
"type": "event_count_custom"
},
{
"name": "Appliance Purchases",
"type": "event_count_custom"
},
{
"name": "Test User",
"type": "event_count_custom"
}
]
},
{
"id": "A metric for testing teams::event_count_custom",
"name": "A metric for testing teams",
"directionality": "increase",
"type": "event_count_custom",
"description": "",
"isPermanent": false,
"isReadOnly": false,
"isHidden": false,
"isVerified": false,
"tags": [],
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"createdTime": 1706640947812,
"owner": {
"name": "Test User"
},
"lineage": {
"events": [
"add_to_cart"
],
"metrics": []
},
"team": null,
"unitTypes": [
"userID"
],
"metricEvents": [
{
"name": "add_to_cart",
"criteria": [
{
"type": "value",
"column": "",
"condition": "in",
"values": [
"sports"
]
}
]
}
]
}
],
"pagination": {
"itemsPerPage": 5,
"pageNumber": 1,
"totalItems": 2699,
"nextPage": "/console/v1/metrics/list?page=2&limit=5",
"previousPage": null,
"all": "/console/v1/metrics/list"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
Path Parameters
id
Query Parameters
Which layer to place the experiment into.
The idType the experiment will be performed on
The current status of the experiment
Name of the creator.
ID of the user who created the entity.
Filter by tags
Results per page
Example:
10
Page number
Example:
1
Response
List experinments using metric response
⌘I

