Get Dynamic Config
curl --request GET \
--url https://statsigapi.net/console/v1/dynamic_configs/{id} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{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": "Dynamic config read successfully.",
"data": {
"id": "a_dynamic_config",
"description": "helpful summary of what this dynamic config does",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifierName": "CONSOLE API",
"creatorEmail": "johnsmith@mydomain.com",
"creatorName": "John Smith",
"createdTime": 1674769467002,
"lastModifiedTime": 1707344887865,
"lastModifierEmail": null,
"holdoutIDs": [],
"isEnabled": true,
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "public",
"operator": "string",
"targetValue": 0,
"field": "string",
"customID": "string"
}
],
"returnValue": {
"key": true
}
}
],
"defaultValue": {
"key": "the default value"
},
"tags": [
"a tag"
]
}
}{
"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."
}Dynamic Configs
Get Dynamic Config
GET
/
console
/
v1
/
dynamic_configs
/
{id}
Get Dynamic Config
curl --request GET \
--url https://statsigapi.net/console/v1/dynamic_configs/{id} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{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/dynamic_configs/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{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": "Dynamic config read successfully.",
"data": {
"id": "a_dynamic_config",
"description": "helpful summary of what this dynamic config does",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifierName": "CONSOLE API",
"creatorEmail": "johnsmith@mydomain.com",
"creatorName": "John Smith",
"createdTime": 1674769467002,
"lastModifiedTime": 1707344887865,
"lastModifierEmail": null,
"holdoutIDs": [],
"isEnabled": true,
"rules": [
{
"name": "All Conditions",
"id": "38ttpCpzrQFTMKcqFKk02l:10.00:1",
"baseID": "38ttpCpzrQFTMKcqFKk02l",
"passPercentage": 10,
"conditions": [
{
"type": "public",
"operator": "string",
"targetValue": 0,
"field": "string",
"customID": "string"
}
],
"returnValue": {
"key": true
}
}
],
"defaultValue": {
"key": "the default value"
},
"tags": [
"a tag"
]
}
}{
"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

