Get Dynamic Config Rules
curl --request GET \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rules \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{id}/rules"
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}/rules', 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}/rules",
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}/rules"
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}/rules")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{id}/rules")
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 rules read successfully.",
"data": [
{
"rules": [
{
"id": "5pjzfmF8KLFsh81kBPyxvR",
"baseID": "5pjzfmF8KLFsh81kBPyxvR",
"name": "rule name",
"passPercentage": 1,
"conditions": [
{
"type": "browser_name",
"targetValue": [],
"operator": "any"
}
],
"environments": null
},
{
"id": "6jQEnu1fCnXqjXhm1qGEnt",
"baseID": "6jQEnu1fCnXqjXhm1qGEnt",
"name": "Other2",
"passPercentage": 80,
"conditions": [],
"environments": null
},
{
"id": "4DonExIcOjSV8kG3WSQ5Zm",
"baseID": "4DonExIcOjSV8kG3WSQ5Zm",
"name": "Austin's fav rule",
"passPercentage": 8,
"conditions": [],
"environments": null
}
]
}
],
"pagination": {
"itemsPerPage": 20000,
"pageNumber": 1,
"totalItems": 1,
"nextPage": null,
"previousPage": null,
"all": ""
}
}Dynamic Configs
Get Dynamic Config Rules
GET
/
console
/
v1
/
dynamic_configs
/
{id}
/
rules
Get Dynamic Config Rules
curl --request GET \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rules \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{id}/rules"
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}/rules', 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}/rules",
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}/rules"
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}/rules")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{id}/rules")
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 rules read successfully.",
"data": [
{
"rules": [
{
"id": "5pjzfmF8KLFsh81kBPyxvR",
"baseID": "5pjzfmF8KLFsh81kBPyxvR",
"name": "rule name",
"passPercentage": 1,
"conditions": [
{
"type": "browser_name",
"targetValue": [],
"operator": "any"
}
],
"environments": null
},
{
"id": "6jQEnu1fCnXqjXhm1qGEnt",
"baseID": "6jQEnu1fCnXqjXhm1qGEnt",
"name": "Other2",
"passPercentage": 80,
"conditions": [],
"environments": null
},
{
"id": "4DonExIcOjSV8kG3WSQ5Zm",
"baseID": "4DonExIcOjSV8kG3WSQ5Zm",
"name": "Austin's fav rule",
"passPercentage": 8,
"conditions": [],
"environments": null
}
]
}
],
"pagination": {
"itemsPerPage": 20000,
"pageNumber": 1,
"totalItems": 1,
"nextPage": null,
"previousPage": null,
"all": ""
}
}Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
Path Parameters
id
Response
200 - application/json
Get Dynamic Config Rules Response
⌘I

