List Holdouts
curl --request GET \
--url https://statsigapi.net/console/v1/holdouts \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/holdouts"
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/holdouts', 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/holdouts",
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/holdouts"
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/holdouts")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/holdouts")
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": "Holdouts listed successfully.",
"data": [
{
"id": "testing_holdout",
"name": "testing holdout",
"description": "helpful summary of what this holdout does",
"idType": "userID",
"lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
"lastModifiedTime": 1719873874212,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "4dcQUIpS8PHObBGD7HJwOx",
"createdTime": 1719873870785,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"tags": [],
"team": "Console Team",
"isEnabled": true,
"isGlobal": false,
"passPercentage": 0,
"gateIDs": [],
"experimentIDs": [],
"layerIDs": [],
"targetingGateID": null
},
{
"id": "test123",
"name": "test123",
"description": "",
"idType": "userID",
"lastModifierID": "5O908pyGoCqw6QH1nt8v82",
"lastModifiedTime": 1719872028057,
"lastModifierName": "test",
"lastModifierEmail": "user@statsig.com",
"creatorID": "5O908pyGoCqw6QH1nt8v82",
"createdTime": 1719872027567,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"tags": [],
"team": "Console Team",
"isEnabled": true,
"isGlobal": false,
"passPercentage": 0,
"gateIDs": [],
"experimentIDs": [],
"layerIDs": [],
"targetingGateID": null
},
{
"id": "test_target_gate",
"name": "test_target_gate",
"description": "test holdout",
"idType": "userID",
"lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
"lastModifiedTime": 1710521134863,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "5sgBiiuoBX4fscrWdCXVma",
"createdTime": 1702237002465,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"tags": [],
"team": null,
"isEnabled": true,
"isGlobal": false,
"passPercentage": 1,
"gateIDs": [
"product_larger_image",
"product_larger_image_lower",
"test_new_gate",
"ma_test_rollout",
"empty_gate",
"new_gate_to_point_experiment_at",
"new_gate_with_monitoring_metrics",
"andy_test_gate"
],
"experimentIDs": [
"mostly_test_experiment",
"test_123",
"new_test_exp",
"test_exp_start",
"andy_test_experiment"
],
"layerIDs": [
"Homepage Feed Improvements",
"statsig_is_awesome",
"testing_tool",
"test_statsig_2",
"layer_holdout_parameters"
],
"targetingGateID": ""
}
],
"pagination": {
"itemsPerPage": 20000,
"pageNumber": 1,
"totalItems": 3,
"nextPage": null,
"previousPage": null,
"all": "/console/v1/holdouts"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Holdouts
List Holdouts
GET
/
console
/
v1
/
holdouts
List Holdouts
curl --request GET \
--url https://statsigapi.net/console/v1/holdouts \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/holdouts"
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/holdouts', 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/holdouts",
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/holdouts"
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/holdouts")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/holdouts")
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": "Holdouts listed successfully.",
"data": [
{
"id": "testing_holdout",
"name": "testing holdout",
"description": "helpful summary of what this holdout does",
"idType": "userID",
"lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
"lastModifiedTime": 1719873874212,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "4dcQUIpS8PHObBGD7HJwOx",
"createdTime": 1719873870785,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"tags": [],
"team": "Console Team",
"isEnabled": true,
"isGlobal": false,
"passPercentage": 0,
"gateIDs": [],
"experimentIDs": [],
"layerIDs": [],
"targetingGateID": null
},
{
"id": "test123",
"name": "test123",
"description": "",
"idType": "userID",
"lastModifierID": "5O908pyGoCqw6QH1nt8v82",
"lastModifiedTime": 1719872028057,
"lastModifierName": "test",
"lastModifierEmail": "user@statsig.com",
"creatorID": "5O908pyGoCqw6QH1nt8v82",
"createdTime": 1719872027567,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"tags": [],
"team": "Console Team",
"isEnabled": true,
"isGlobal": false,
"passPercentage": 0,
"gateIDs": [],
"experimentIDs": [],
"layerIDs": [],
"targetingGateID": null
},
{
"id": "test_target_gate",
"name": "test_target_gate",
"description": "test holdout",
"idType": "userID",
"lastModifierID": "4dcQUIpS8PHObBGD7HJwOx",
"lastModifiedTime": 1710521134863,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "5sgBiiuoBX4fscrWdCXVma",
"createdTime": 1702237002465,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"tags": [],
"team": null,
"isEnabled": true,
"isGlobal": false,
"passPercentage": 1,
"gateIDs": [
"product_larger_image",
"product_larger_image_lower",
"test_new_gate",
"ma_test_rollout",
"empty_gate",
"new_gate_to_point_experiment_at",
"new_gate_with_monitoring_metrics",
"andy_test_gate"
],
"experimentIDs": [
"mostly_test_experiment",
"test_123",
"new_test_exp",
"test_exp_start",
"andy_test_experiment"
],
"layerIDs": [
"Homepage Feed Improvements",
"statsig_is_awesome",
"testing_tool",
"test_statsig_2",
"layer_holdout_parameters"
],
"targetingGateID": ""
}
],
"pagination": {
"itemsPerPage": 20000,
"pageNumber": 1,
"totalItems": 3,
"nextPage": null,
"previousPage": null,
"all": "/console/v1/holdouts"
}
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Headers
Query Parameters
Response
List holdouts response

