Get Layers
curl --request GET \
--url https://statsigapi.net/console/v1/layers \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/layers"
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/layers', 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/layers",
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/layers"
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/layers")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/layers")
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": "Layers listed successfully.",
"data": [
{
"id": "statsig::product_logo_icon_shapes_multi_group_layer",
"description": "",
"idType": "userID",
"lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
"lastModifiedTime": 1677893118949,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "5sgBiiuoBX4fscrWdCXVma",
"createdTime": 1677893118889,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isImplicitLayer": true,
"parameters": []
},
{
"id": "Homepage Feed Improvements",
"description": "test description",
"idType": "userID",
"lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
"lastModifiedTime": 1702925736079,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "6Q78Ih2m3FnOoECDsvzoms",
"createdTime": 1678122232525,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [
"global_holdout",
"test_target_gate"
],
"tags": [],
"team": null,
"isImplicitLayer": false,
"parameters": [
{
"name": "ranking_model",
"type": "string",
"defaultValue": "4v2"
},
{
"name": "test",
"type": "string",
"defaultValue": "randomtextfdafs"
},
{
"name": "newparam",
"type": "string",
"defaultValue": ""
},
{
"name": "test!!!",
"type": "string",
"defaultValue": ""
},
{
"name": "test_object",
"type": "object",
"defaultValue": {
"test": "hello"
}
}
]
},
{
"id": "statsig::mostly_test_experiment_layer",
"description": "",
"idType": "userID",
"lastModifierID": "6Q78Ih2m3FnOoECDsvzoms",
"lastModifiedTime": 1678401652668,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "6Q78Ih2m3FnOoECDsvzoms",
"createdTime": 1678401652627,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isImplicitLayer": true,
"parameters": []
}
],
"pagination": {
"itemsPerPage": 3,
"pageNumber": 1,
"totalItems": 1189,
"nextPage": "/console/v1/layers?page=2&limit=3",
"previousPage": null,
"all": "/console/v1/layers"
}
}{
"status": 400,
"message": "Invalid request. Please check the request input and try again."
}{
"status": 401,
"message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}Layers
Get Layers
GET
/
console
/
v1
/
layers
Get Layers
curl --request GET \
--url https://statsigapi.net/console/v1/layers \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/layers"
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/layers', 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/layers",
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/layers"
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/layers")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/layers")
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": "Layers listed successfully.",
"data": [
{
"id": "statsig::product_logo_icon_shapes_multi_group_layer",
"description": "",
"idType": "userID",
"lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
"lastModifiedTime": 1677893118949,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "5sgBiiuoBX4fscrWdCXVma",
"createdTime": 1677893118889,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isImplicitLayer": true,
"parameters": []
},
{
"id": "Homepage Feed Improvements",
"description": "test description",
"idType": "userID",
"lastModifierID": "5sgBiiuoBX4fscrWdCXVma",
"lastModifiedTime": 1702925736079,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "6Q78Ih2m3FnOoECDsvzoms",
"createdTime": 1678122232525,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [
"global_holdout",
"test_target_gate"
],
"tags": [],
"team": null,
"isImplicitLayer": false,
"parameters": [
{
"name": "ranking_model",
"type": "string",
"defaultValue": "4v2"
},
{
"name": "test",
"type": "string",
"defaultValue": "randomtextfdafs"
},
{
"name": "newparam",
"type": "string",
"defaultValue": ""
},
{
"name": "test!!!",
"type": "string",
"defaultValue": ""
},
{
"name": "test_object",
"type": "object",
"defaultValue": {
"test": "hello"
}
}
]
},
{
"id": "statsig::mostly_test_experiment_layer",
"description": "",
"idType": "userID",
"lastModifierID": "6Q78Ih2m3FnOoECDsvzoms",
"lastModifiedTime": 1678401652668,
"lastModifierName": "Test User",
"lastModifierEmail": "test@statsig.com",
"creatorID": "6Q78Ih2m3FnOoECDsvzoms",
"createdTime": 1678401652627,
"creatorName": "Test User",
"creatorEmail": "test@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isImplicitLayer": true,
"parameters": []
}
],
"pagination": {
"itemsPerPage": 3,
"pageNumber": 1,
"totalItems": 1189,
"nextPage": "/console/v1/layers?page=2&limit=3",
"previousPage": null,
"all": "/console/v1/layers"
}
}{
"status": 400,
"message": "Invalid request. Please check the request input and try again."
}{
"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.
Query Parameters
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
Get Layers response
⌘I

