Get Experiment
curl --request GET \
--url https://statsigapi.net/console/v1/experiments/{id} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/experiments/{id}"
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/experiments/{id}', 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/experiments/{id}",
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/experiments/{id}"
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/experiments/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/experiments/{id}")
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": "Experiments listed successfully.",
"data": {
"id": "a_experiment",
"description": "",
"lastModifiedTime": 1707427635442,
"lastModifierEmail": null,
"createdTime": 1707427634717,
"creatorName": "CONSOLE API",
"lastModifierName": "CONSOLE API",
"lastModifierID": "4FKF0sUbi1D7xZFW5vcHWB",
"idType": "userID",
"status": "setup",
"launchedGroupID": null,
"layerID": "statsig::a_experiment_layer",
"hypothesis": "",
"primaryMetrics": [],
"primaryMetricTags": [],
"secondaryMetrics": [],
"secondaryMetricTags": [],
"startTime": null,
"endTime": null,
"decisionTime": null,
"groups": [
{
"name": "Control",
"id": "4HbgLdfqlIeN3sHkyMG1qC",
"size": 50,
"parameterValues": {}
},
{
"name": "Test",
"size": 50,
"parameterValues": {}
}
],
"allocation": 100,
"duration": 14,
"targetingGateID": "",
"defaultConfidenceInterval": "95",
"bonferroniCorrection": false,
"tags": [
"* Core"
],
"decisionReason": "",
"owner": {
"ownerType": "USER",
"ownerName": "Test User"
},
"healthCheckStatus": "PASSED",
"inlineTargetingRulesJSON": "{}"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}{
"status": 404,
"message": "Not Found. The requested resource could not be found."
}Experiments
Get Experiment
GET
/
console
/
v1
/
experiments
/
{id}
Get Experiment
curl --request GET \
--url https://statsigapi.net/console/v1/experiments/{id} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/experiments/{id}"
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/experiments/{id}', 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/experiments/{id}",
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/experiments/{id}"
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/experiments/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/experiments/{id}")
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": "Experiments listed successfully.",
"data": {
"id": "a_experiment",
"description": "",
"lastModifiedTime": 1707427635442,
"lastModifierEmail": null,
"createdTime": 1707427634717,
"creatorName": "CONSOLE API",
"lastModifierName": "CONSOLE API",
"lastModifierID": "4FKF0sUbi1D7xZFW5vcHWB",
"idType": "userID",
"status": "setup",
"launchedGroupID": null,
"layerID": "statsig::a_experiment_layer",
"hypothesis": "",
"primaryMetrics": [],
"primaryMetricTags": [],
"secondaryMetrics": [],
"secondaryMetricTags": [],
"startTime": null,
"endTime": null,
"decisionTime": null,
"groups": [
{
"name": "Control",
"id": "4HbgLdfqlIeN3sHkyMG1qC",
"size": 50,
"parameterValues": {}
},
{
"name": "Test",
"size": 50,
"parameterValues": {}
}
],
"allocation": 100,
"duration": 14,
"targetingGateID": "",
"defaultConfidenceInterval": "95",
"bonferroniCorrection": false,
"tags": [
"* Core"
],
"decisionReason": "",
"owner": {
"ownerType": "USER",
"ownerName": "Test User"
},
"healthCheckStatus": "PASSED",
"inlineTargetingRulesJSON": "{}"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}{
"status": 404,
"message": "Not Found. The requested resource could not be found."
}Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
Path Parameters
id
⌘I

