Delete Dynamic Config Rule By Name
curl --request DELETE \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}"
headers = {"STATSIG-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'STATSIG-API-KEY': '<api-key>'}};
fetch('https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}', 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}/rule/name/{ruleName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/rule/name/{ruleName}"
req, _ := http.NewRequest("DELETE", 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.delete("https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Dynamic Config rule deleted successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721251399582,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "3exemrfZ5pwOk6qyDH0dhP",
"createdTime": 1721247911588,
"creatorName": "Jathu Theivikaran",
"creatorEmail": "jathurshan@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isEnabled": true,
"rules": [
{
"id": "2IIQAN6wbUyHJiLbrcBuvx:80.00:1",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}Dynamic Configs
Delete Dynamic Config Rule By Name
DELETE
/
console
/
v1
/
dynamic_configs
/
{id}
/
rule
/
name
/
{ruleName}
Delete Dynamic Config Rule By Name
curl --request DELETE \
--url https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName} \
--header 'STATSIG-API-KEY: <api-key>'import requests
url = "https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}"
headers = {"STATSIG-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'STATSIG-API-KEY': '<api-key>'}};
fetch('https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}', 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}/rule/name/{ruleName}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/rule/name/{ruleName}"
req, _ := http.NewRequest("DELETE", 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.delete("https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}")
.header("STATSIG-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/dynamic_configs/{id}/rule/name/{ruleName}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"message": "Dynamic Config rule deleted successfully.",
"data": {
"id": "dc2",
"name": "dc2",
"description": "",
"idType": "userID",
"lastModifierID": "65pqqzT46Kl7lHnd2JCmgH",
"lastModifiedTime": 1721251399582,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "3exemrfZ5pwOk6qyDH0dhP",
"createdTime": 1721247911588,
"creatorName": "Jathu Theivikaran",
"creatorEmail": "jathurshan@statsig.com",
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"team": null,
"isEnabled": true,
"rules": [
{
"id": "2IIQAN6wbUyHJiLbrcBuvx:80.00:1",
"baseID": "2IIQAN6wbUyHJiLbrcBuvx",
"name": "Other",
"passPercentage": 80,
"conditions": [],
"returnValue": true,
"returnValueJson5": "true",
"environments": null
}
],
"defaultValue": {},
"defaultValueJson5": "{}"
}
}Authorizations
Headers
Optional header to respect review settings for mutation endpoints.
⌘I

