curl --request PATCH \
--url https://statsigapi.net/console/v1/experiments/{id} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"description": "<string>",
"idType": "<string>",
"secondaryIDType": "<string>",
"hypothesis": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>"
}
],
"groups": [
{
"name": "<string>",
"size": 50,
"parameterValues": {},
"id": "<string>",
"disabled": true,
"description": "<string>",
"foreignGroupID": "<string>"
}
],
"controlGroupID": "<string>",
"allocation": 50,
"primaryMetricTags": [
"<string>"
],
"secondaryMetricTags": [
"<string>"
],
"primaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"secondaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"targetApps": "<string>",
"tags": [
"<string>"
],
"duration": 2,
"targetExposures": 2,
"targetingGateID": "<string>",
"sequentialTesting": true,
"bonferroniCorrection": true,
"bonferroniCorrectionPerMetric": true,
"benjaminiHochbergPerVariant": true,
"benjaminiHochbergPerMetric": true,
"benjaminiPrimaryMetricsOnly": true,
"launchedGroupID": "<string>",
"assignmentSourceName": "<string>",
"assignmentSourceExperimentName": "<string>",
"creatorID": "<string>",
"creatorEmail": "<string>",
"isAnalysisOnly": true,
"team": "<string>",
"teamID": "<string>",
"allocationDuration": 2,
"cohortedAnalysisDuration": 2,
"cohortedMetricsMatureAfterEnd": true,
"cohortWaitUntilEndToInclude": true,
"fixedAnalysisDuration": 2,
"scheduledReloadHour": 11,
"analysisEndTime": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
},
"assignmentSourceFilters": [
{
"column": "<string>",
"values": [
"<string>"
]
}
]
}
'import requests
url = "https://statsigapi.net/console/v1/experiments/{id}"
payload = {
"description": "<string>",
"idType": "<string>",
"secondaryIDType": "<string>",
"hypothesis": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>"
}
],
"groups": [
{
"name": "<string>",
"size": 50,
"parameterValues": {},
"id": "<string>",
"disabled": True,
"description": "<string>",
"foreignGroupID": "<string>"
}
],
"controlGroupID": "<string>",
"allocation": 50,
"primaryMetricTags": ["<string>"],
"secondaryMetricTags": ["<string>"],
"primaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"secondaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"targetApps": "<string>",
"tags": ["<string>"],
"duration": 2,
"targetExposures": 2,
"targetingGateID": "<string>",
"sequentialTesting": True,
"bonferroniCorrection": True,
"bonferroniCorrectionPerMetric": True,
"benjaminiHochbergPerVariant": True,
"benjaminiHochbergPerMetric": True,
"benjaminiPrimaryMetricsOnly": True,
"launchedGroupID": "<string>",
"assignmentSourceName": "<string>",
"assignmentSourceExperimentName": "<string>",
"creatorID": "<string>",
"creatorEmail": "<string>",
"isAnalysisOnly": True,
"team": "<string>",
"teamID": "<string>",
"allocationDuration": 2,
"cohortedAnalysisDuration": 2,
"cohortedMetricsMatureAfterEnd": True,
"cohortWaitUntilEndToInclude": True,
"fixedAnalysisDuration": 2,
"scheduledReloadHour": 11,
"analysisEndTime": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
},
"assignmentSourceFilters": [
{
"column": "<string>",
"values": ["<string>"]
}
]
}
headers = {
"STATSIG-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'STATSIG-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
idType: '<string>',
secondaryIDType: '<string>',
hypothesis: '<string>',
links: [{url: '<string>', title: '<string>'}],
groups: [
{
name: '<string>',
size: 50,
parameterValues: {},
id: '<string>',
disabled: true,
description: '<string>',
foreignGroupID: '<string>'
}
],
controlGroupID: '<string>',
allocation: 50,
primaryMetricTags: ['<string>'],
secondaryMetricTags: ['<string>'],
primaryMetrics: [{name: '<string>', type: '<string>', hypothesizedValue: 123}],
secondaryMetrics: [{name: '<string>', type: '<string>', hypothesizedValue: 123}],
targetApps: '<string>',
tags: ['<string>'],
duration: 2,
targetExposures: 2,
targetingGateID: '<string>',
sequentialTesting: true,
bonferroniCorrection: true,
bonferroniCorrectionPerMetric: true,
benjaminiHochbergPerVariant: true,
benjaminiHochbergPerMetric: true,
benjaminiPrimaryMetricsOnly: true,
launchedGroupID: '<string>',
assignmentSourceName: '<string>',
assignmentSourceExperimentName: '<string>',
creatorID: '<string>',
creatorEmail: '<string>',
isAnalysisOnly: true,
team: '<string>',
teamID: '<string>',
allocationDuration: 2,
cohortedAnalysisDuration: 2,
cohortedMetricsMatureAfterEnd: true,
cohortWaitUntilEndToInclude: true,
fixedAnalysisDuration: 2,
scheduledReloadHour: 11,
analysisEndTime: '<string>',
precommitWebhook: {url: '<string>', internalStatusUrl: '<string>'},
assignmentSourceFilters: [{column: '<string>', values: ['<string>']}]
})
};
fetch('https://statsigapi.net/console/v1/experiments/{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/experiments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'idType' => '<string>',
'secondaryIDType' => '<string>',
'hypothesis' => '<string>',
'links' => [
[
'url' => '<string>',
'title' => '<string>'
]
],
'groups' => [
[
'name' => '<string>',
'size' => 50,
'parameterValues' => [
],
'id' => '<string>',
'disabled' => true,
'description' => '<string>',
'foreignGroupID' => '<string>'
]
],
'controlGroupID' => '<string>',
'allocation' => 50,
'primaryMetricTags' => [
'<string>'
],
'secondaryMetricTags' => [
'<string>'
],
'primaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>',
'hypothesizedValue' => 123
]
],
'secondaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>',
'hypothesizedValue' => 123
]
],
'targetApps' => '<string>',
'tags' => [
'<string>'
],
'duration' => 2,
'targetExposures' => 2,
'targetingGateID' => '<string>',
'sequentialTesting' => true,
'bonferroniCorrection' => true,
'bonferroniCorrectionPerMetric' => true,
'benjaminiHochbergPerVariant' => true,
'benjaminiHochbergPerMetric' => true,
'benjaminiPrimaryMetricsOnly' => true,
'launchedGroupID' => '<string>',
'assignmentSourceName' => '<string>',
'assignmentSourceExperimentName' => '<string>',
'creatorID' => '<string>',
'creatorEmail' => '<string>',
'isAnalysisOnly' => true,
'team' => '<string>',
'teamID' => '<string>',
'allocationDuration' => 2,
'cohortedAnalysisDuration' => 2,
'cohortedMetricsMatureAfterEnd' => true,
'cohortWaitUntilEndToInclude' => true,
'fixedAnalysisDuration' => 2,
'scheduledReloadHour' => 11,
'analysisEndTime' => '<string>',
'precommitWebhook' => [
'url' => '<string>',
'internalStatusUrl' => '<string>'
],
'assignmentSourceFilters' => [
[
'column' => '<string>',
'values' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://statsigapi.net/console/v1/experiments/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("STATSIG-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://statsigapi.net/console/v1/experiments/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/experiments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "string",
"data": {
"id": "a_experiment",
"description": "a helpful summary of what this experiment does",
"lastModifierName": "CONSOLE API",
"lastModifierID": "f0JAV9dd7KF0sUbi1DHWB",
"idType": "userID",
"status": "setup",
"layerID": "layer1",
"hypothesis": "Does 1 or 0 work better?",
"primaryMetrics": [
{
"name": "l14",
"type": "user"
}
],
"primaryMetricTags": [],
"secondaryMetrics": [
{
"name": "mau_28d",
"type": "user"
}
],
"secondaryMetricTags": [],
"groups": [
{
"name": "group1",
"size": 50,
"parameterValues": {
"key": 1
}
},
{
"name": "gruop2",
"size": 50,
"parameterValues": {
"key": 0
}
}
],
"allocation": 50.46,
"duration": 14,
"targetingGateID": "a_gate",
"defaultConfidenceInterval": "95",
"bonferroniCorrection": false,
"tags": []
}
}{
"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."
}Partially Update Experiment
curl --request PATCH \
--url https://statsigapi.net/console/v1/experiments/{id} \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"description": "<string>",
"idType": "<string>",
"secondaryIDType": "<string>",
"hypothesis": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>"
}
],
"groups": [
{
"name": "<string>",
"size": 50,
"parameterValues": {},
"id": "<string>",
"disabled": true,
"description": "<string>",
"foreignGroupID": "<string>"
}
],
"controlGroupID": "<string>",
"allocation": 50,
"primaryMetricTags": [
"<string>"
],
"secondaryMetricTags": [
"<string>"
],
"primaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"secondaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"targetApps": "<string>",
"tags": [
"<string>"
],
"duration": 2,
"targetExposures": 2,
"targetingGateID": "<string>",
"sequentialTesting": true,
"bonferroniCorrection": true,
"bonferroniCorrectionPerMetric": true,
"benjaminiHochbergPerVariant": true,
"benjaminiHochbergPerMetric": true,
"benjaminiPrimaryMetricsOnly": true,
"launchedGroupID": "<string>",
"assignmentSourceName": "<string>",
"assignmentSourceExperimentName": "<string>",
"creatorID": "<string>",
"creatorEmail": "<string>",
"isAnalysisOnly": true,
"team": "<string>",
"teamID": "<string>",
"allocationDuration": 2,
"cohortedAnalysisDuration": 2,
"cohortedMetricsMatureAfterEnd": true,
"cohortWaitUntilEndToInclude": true,
"fixedAnalysisDuration": 2,
"scheduledReloadHour": 11,
"analysisEndTime": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
},
"assignmentSourceFilters": [
{
"column": "<string>",
"values": [
"<string>"
]
}
]
}
'import requests
url = "https://statsigapi.net/console/v1/experiments/{id}"
payload = {
"description": "<string>",
"idType": "<string>",
"secondaryIDType": "<string>",
"hypothesis": "<string>",
"links": [
{
"url": "<string>",
"title": "<string>"
}
],
"groups": [
{
"name": "<string>",
"size": 50,
"parameterValues": {},
"id": "<string>",
"disabled": True,
"description": "<string>",
"foreignGroupID": "<string>"
}
],
"controlGroupID": "<string>",
"allocation": 50,
"primaryMetricTags": ["<string>"],
"secondaryMetricTags": ["<string>"],
"primaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"secondaryMetrics": [
{
"name": "<string>",
"type": "<string>",
"hypothesizedValue": 123
}
],
"targetApps": "<string>",
"tags": ["<string>"],
"duration": 2,
"targetExposures": 2,
"targetingGateID": "<string>",
"sequentialTesting": True,
"bonferroniCorrection": True,
"bonferroniCorrectionPerMetric": True,
"benjaminiHochbergPerVariant": True,
"benjaminiHochbergPerMetric": True,
"benjaminiPrimaryMetricsOnly": True,
"launchedGroupID": "<string>",
"assignmentSourceName": "<string>",
"assignmentSourceExperimentName": "<string>",
"creatorID": "<string>",
"creatorEmail": "<string>",
"isAnalysisOnly": True,
"team": "<string>",
"teamID": "<string>",
"allocationDuration": 2,
"cohortedAnalysisDuration": 2,
"cohortedMetricsMatureAfterEnd": True,
"cohortWaitUntilEndToInclude": True,
"fixedAnalysisDuration": 2,
"scheduledReloadHour": 11,
"analysisEndTime": "<string>",
"precommitWebhook": {
"url": "<string>",
"internalStatusUrl": "<string>"
},
"assignmentSourceFilters": [
{
"column": "<string>",
"values": ["<string>"]
}
]
}
headers = {
"STATSIG-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'STATSIG-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
idType: '<string>',
secondaryIDType: '<string>',
hypothesis: '<string>',
links: [{url: '<string>', title: '<string>'}],
groups: [
{
name: '<string>',
size: 50,
parameterValues: {},
id: '<string>',
disabled: true,
description: '<string>',
foreignGroupID: '<string>'
}
],
controlGroupID: '<string>',
allocation: 50,
primaryMetricTags: ['<string>'],
secondaryMetricTags: ['<string>'],
primaryMetrics: [{name: '<string>', type: '<string>', hypothesizedValue: 123}],
secondaryMetrics: [{name: '<string>', type: '<string>', hypothesizedValue: 123}],
targetApps: '<string>',
tags: ['<string>'],
duration: 2,
targetExposures: 2,
targetingGateID: '<string>',
sequentialTesting: true,
bonferroniCorrection: true,
bonferroniCorrectionPerMetric: true,
benjaminiHochbergPerVariant: true,
benjaminiHochbergPerMetric: true,
benjaminiPrimaryMetricsOnly: true,
launchedGroupID: '<string>',
assignmentSourceName: '<string>',
assignmentSourceExperimentName: '<string>',
creatorID: '<string>',
creatorEmail: '<string>',
isAnalysisOnly: true,
team: '<string>',
teamID: '<string>',
allocationDuration: 2,
cohortedAnalysisDuration: 2,
cohortedMetricsMatureAfterEnd: true,
cohortWaitUntilEndToInclude: true,
fixedAnalysisDuration: 2,
scheduledReloadHour: 11,
analysisEndTime: '<string>',
precommitWebhook: {url: '<string>', internalStatusUrl: '<string>'},
assignmentSourceFilters: [{column: '<string>', values: ['<string>']}]
})
};
fetch('https://statsigapi.net/console/v1/experiments/{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/experiments/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'idType' => '<string>',
'secondaryIDType' => '<string>',
'hypothesis' => '<string>',
'links' => [
[
'url' => '<string>',
'title' => '<string>'
]
],
'groups' => [
[
'name' => '<string>',
'size' => 50,
'parameterValues' => [
],
'id' => '<string>',
'disabled' => true,
'description' => '<string>',
'foreignGroupID' => '<string>'
]
],
'controlGroupID' => '<string>',
'allocation' => 50,
'primaryMetricTags' => [
'<string>'
],
'secondaryMetricTags' => [
'<string>'
],
'primaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>',
'hypothesizedValue' => 123
]
],
'secondaryMetrics' => [
[
'name' => '<string>',
'type' => '<string>',
'hypothesizedValue' => 123
]
],
'targetApps' => '<string>',
'tags' => [
'<string>'
],
'duration' => 2,
'targetExposures' => 2,
'targetingGateID' => '<string>',
'sequentialTesting' => true,
'bonferroniCorrection' => true,
'bonferroniCorrectionPerMetric' => true,
'benjaminiHochbergPerVariant' => true,
'benjaminiHochbergPerMetric' => true,
'benjaminiPrimaryMetricsOnly' => true,
'launchedGroupID' => '<string>',
'assignmentSourceName' => '<string>',
'assignmentSourceExperimentName' => '<string>',
'creatorID' => '<string>',
'creatorEmail' => '<string>',
'isAnalysisOnly' => true,
'team' => '<string>',
'teamID' => '<string>',
'allocationDuration' => 2,
'cohortedAnalysisDuration' => 2,
'cohortedMetricsMatureAfterEnd' => true,
'cohortWaitUntilEndToInclude' => true,
'fixedAnalysisDuration' => 2,
'scheduledReloadHour' => 11,
'analysisEndTime' => '<string>',
'precommitWebhook' => [
'url' => '<string>',
'internalStatusUrl' => '<string>'
],
'assignmentSourceFilters' => [
[
'column' => '<string>',
'values' => [
'<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://statsigapi.net/console/v1/experiments/{id}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("STATSIG-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://statsigapi.net/console/v1/experiments/{id}")
.header("STATSIG-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://statsigapi.net/console/v1/experiments/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["STATSIG-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"idType\": \"<string>\",\n \"secondaryIDType\": \"<string>\",\n \"hypothesis\": \"<string>\",\n \"links\": [\n {\n \"url\": \"<string>\",\n \"title\": \"<string>\"\n }\n ],\n \"groups\": [\n {\n \"name\": \"<string>\",\n \"size\": 50,\n \"parameterValues\": {},\n \"id\": \"<string>\",\n \"disabled\": true,\n \"description\": \"<string>\",\n \"foreignGroupID\": \"<string>\"\n }\n ],\n \"controlGroupID\": \"<string>\",\n \"allocation\": 50,\n \"primaryMetricTags\": [\n \"<string>\"\n ],\n \"secondaryMetricTags\": [\n \"<string>\"\n ],\n \"primaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"secondaryMetrics\": [\n {\n \"name\": \"<string>\",\n \"type\": \"<string>\",\n \"hypothesizedValue\": 123\n }\n ],\n \"targetApps\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"duration\": 2,\n \"targetExposures\": 2,\n \"targetingGateID\": \"<string>\",\n \"sequentialTesting\": true,\n \"bonferroniCorrection\": true,\n \"bonferroniCorrectionPerMetric\": true,\n \"benjaminiHochbergPerVariant\": true,\n \"benjaminiHochbergPerMetric\": true,\n \"benjaminiPrimaryMetricsOnly\": true,\n \"launchedGroupID\": \"<string>\",\n \"assignmentSourceName\": \"<string>\",\n \"assignmentSourceExperimentName\": \"<string>\",\n \"creatorID\": \"<string>\",\n \"creatorEmail\": \"<string>\",\n \"isAnalysisOnly\": true,\n \"team\": \"<string>\",\n \"teamID\": \"<string>\",\n \"allocationDuration\": 2,\n \"cohortedAnalysisDuration\": 2,\n \"cohortedMetricsMatureAfterEnd\": true,\n \"cohortWaitUntilEndToInclude\": true,\n \"fixedAnalysisDuration\": 2,\n \"scheduledReloadHour\": 11,\n \"analysisEndTime\": \"<string>\",\n \"precommitWebhook\": {\n \"url\": \"<string>\",\n \"internalStatusUrl\": \"<string>\"\n },\n \"assignmentSourceFilters\": [\n {\n \"column\": \"<string>\",\n \"values\": [\n \"<string>\"\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"message": "string",
"data": {
"id": "a_experiment",
"description": "a helpful summary of what this experiment does",
"lastModifierName": "CONSOLE API",
"lastModifierID": "f0JAV9dd7KF0sUbi1DHWB",
"idType": "userID",
"status": "setup",
"layerID": "layer1",
"hypothesis": "Does 1 or 0 work better?",
"primaryMetrics": [
{
"name": "l14",
"type": "user"
}
],
"primaryMetricTags": [],
"secondaryMetrics": [
{
"name": "mau_28d",
"type": "user"
}
],
"secondaryMetricTags": [],
"groups": [
{
"name": "group1",
"size": 50,
"parameterValues": {
"key": 1
}
},
{
"name": "gruop2",
"size": 50,
"parameterValues": {
"key": 0
}
}
],
"allocation": 50.46,
"duration": 14,
"targetingGateID": "a_gate",
"defaultConfidenceInterval": "95",
"bonferroniCorrection": false,
"tags": []
}
}{
"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
Body
A helpful summary of what this experiment does
1000The type of ID which the experiment is based on
The secondary ID type for the experiment used in WHN for ID resolution
A statement that will be tested by this experiment
Links to relevant documentation or resources
Show child attributes
Show child attributes
The test groups for your experiment
Show child attributes
Show child attributes
Optional control group ID
Percent of layer allocated to this experiment
0 <= x <= 100Primary metric tags for the experiment
Secondary metric tags for the experiment
Main metrics needed to evaluate your hypothesis
Show child attributes
Show child attributes
Additional metrics to monitor that might impact the analysis or final decision of the experiment
Show child attributes
Show child attributes
Target apps assigned to this experiment
Tags associated with the experiment
How long the experiment is expected to last in days
x > 1Target exposures for the experiment
x > 1Restrict your experiment to users passing the selected feature gate
Apply sequential testing?
Is Bonferroni correction applied per variant?
Is Bonferroni correction applied per metric?
Is Benjamini-Hochberg procedure applied per variant?
Is Benjamini-Hochberg procedure applied per metric?
Is Benjamini-Hochberg procedure applied for primary metrics only?
Default error margin used for results
80, 90, 95, 98, 99 The current status of the experiment
active, setup, decision_made, abandoned, archived, experiment_stopped, assignment_stopped ID of the launched group, null otherwise
Source name of the assignment
Name of the source experiment for assignment
The Statsig ID of the creator of this experiment
The email of the creator of this experiment
For Warehouse Native
The team name associated with the experiment, Enterprise only.
The team ID associated with the experiment, Enterprise only.
Warehouse Native Only - Allocation duration in days
x > 1Warehouse Native Only - Cohorted analysis duration in days
x > 1Warehouse Native Only - Allow cohort metrics to mature after experiment end
Warehouse Native Only - Whether to filter to units whose experiment cohort analysis duration is complete, if cohortedAnalysisDuration exists
Fixed analysis duration in days
x > 1Warehouse Native only - UTC hour at which to run scheduled pulse loads
0 <= x <= 23Warehouse Native only - reload type for scheduled reloads
full, incremental Warehouse Native only - end time for analysis only experiments
Show child attributes
Show child attributes
Array of criteria for filtering assignment sources.
Show child attributes
Show child attributes
The mode of analysis for the experiment, e.g frequentist, bayesian, sprt
frequentist, bayesian, sprt 
