Modify temporary rollout status for a stopped experiment
POST
/
v1
/
experiments
/
{id}
/
modify-temporary-rollout
cURL
curl -X POST 'https://api.growthbook.io/api/v1/experiments/exp_abc123/modify-temporary-rollout' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"enableTemporaryRollout":false}'import requests
url = "https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout"
payload = {
"enableTemporaryRollout": True,
"releasedVariationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enableTemporaryRollout: true, releasedVariationId: '<string>'})
};
fetch('https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout', 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://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enableTemporaryRollout' => true,
'releasedVariationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout"
payload := strings.NewReader("{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"experiment": {
"id": "<string>",
"trackingKey": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"name": "<string>",
"project": "<string>",
"hypothesis": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"owner": "<string>",
"archived": true,
"status": "<string>",
"autoRefresh": true,
"hashAttribute": "<string>",
"hashVersion": 1,
"variations": [
{
"variationId": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"screenshots": [
"<string>"
]
}
],
"phases": [
{
"name": "<string>",
"dateStarted": "<string>",
"dateEnded": "<string>",
"reasonForStopping": "<string>",
"seed": "<string>",
"coverage": 123,
"trafficSplit": [
{
"variationId": "<string>",
"weight": 123
}
],
"targetingCondition": "<string>",
"namespace": {
"namespaceId": "<string>",
"enabled": true,
"range": [
123
],
"ranges": [
[
123,
123
]
]
},
"prerequisites": [
{
"id": "<string>",
"condition": "<string>"
}
],
"savedGroupTargeting": [
{
"savedGroups": [
"<string>"
]
}
]
}
],
"settings": {
"datasourceId": "<string>",
"assignmentQueryId": "<string>",
"experimentId": "<string>",
"segmentId": "<string>",
"queryFilter": "<string>",
"goals": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"secondaryMetrics": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"guardrails": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"lookbackOverride": {
"value": 123
},
"regressionAdjustmentEnabled": true,
"sequentialTestingEnabled": true,
"sequentialTestingTuningParameter": 123,
"postStratificationEnabled": true,
"decisionFrameworkSettings": {
"decisionCriteriaId": "<string>",
"decisionFrameworkMetricOverrides": [
{
"id": "<string>",
"targetMDE": 123
}
]
},
"metricOverrides": [
{
"id": "<string>",
"windowHours": 123,
"delayHours": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
],
"activationMetric": {
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
},
"ownerEmail": "<string>",
"fallbackAttribute": "<string>",
"disableStickyBucketing": true,
"bucketVersion": 123,
"minBucketVersion": 123,
"resultSummary": {
"status": "<string>",
"winner": "<string>",
"conclusions": "<string>",
"releasedVariationId": "<string>",
"excludeFromPayload": true
},
"publicUrl": "<string>",
"banditScheduleValue": 123,
"banditBurnInValue": 123,
"banditConversionWindowValue": 123,
"linkedFeatures": [
"<string>"
],
"hasVisualChangesets": true,
"hasURLRedirects": true,
"customFields": {},
"customMetricSlices": [
{
"slices": [
{
"column": "<string>",
"levels": [
"<string>"
]
}
]
}
],
"precomputedUnitDimensionIds": [
"<string>"
],
"defaultDashboardId": "<string>",
"templateId": "<string>",
"statusUpdateSchedule": {
"startAt": "2023-11-07T05:31:56Z"
},
"nextScheduledStatusUpdate": {
"type": "start",
"date": "2023-11-07T05:31:56Z"
},
"enhancedStatus": {
"detailedStatus": "<string>"
}
}
}{
"message": "<string>",
"code": "invalid_status",
"details": {
"currentStatus": "<string>",
"expectedStatuses": [
"<string>"
]
}
}Authorizations
bearerAuthbasicAuth
If using Bearer auth, pass the Secret Key as the token:
curl https://api.growthbook.io/api/v1/features -H "Authorization: Bearer secret_abc123DEF456"
Path Parameters
The id of the requested resource
Body
application/json
If true, keep the stopped experiment in SDK payload and force traffic to the winner variation. If false, end temporary rollout and remove from SDK payload.
Variation ID (e.g. var_abc123) to release to 100% of traffic eligible for this experiment. Required if enableTemporaryRollout is true.
Response
Resource created
Show child attributes
Show child attributes
Was this page helpful?
⌘I
cURL
curl -X POST 'https://api.growthbook.io/api/v1/experiments/exp_abc123/modify-temporary-rollout' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"enableTemporaryRollout":false}'import requests
url = "https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout"
payload = {
"enableTemporaryRollout": True,
"releasedVariationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enableTemporaryRollout: true, releasedVariationId: '<string>'})
};
fetch('https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout', 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://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enableTemporaryRollout' => true,
'releasedVariationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout"
payload := strings.NewReader("{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.post("https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.growthbook.io/api/v1/experiments/{id}/modify-temporary-rollout")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enableTemporaryRollout\": true,\n \"releasedVariationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"experiment": {
"id": "<string>",
"trackingKey": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"dateUpdated": "2023-11-07T05:31:56Z",
"name": "<string>",
"project": "<string>",
"hypothesis": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"owner": "<string>",
"archived": true,
"status": "<string>",
"autoRefresh": true,
"hashAttribute": "<string>",
"hashVersion": 1,
"variations": [
{
"variationId": "<string>",
"key": "<string>",
"name": "<string>",
"description": "<string>",
"screenshots": [
"<string>"
]
}
],
"phases": [
{
"name": "<string>",
"dateStarted": "<string>",
"dateEnded": "<string>",
"reasonForStopping": "<string>",
"seed": "<string>",
"coverage": 123,
"trafficSplit": [
{
"variationId": "<string>",
"weight": 123
}
],
"targetingCondition": "<string>",
"namespace": {
"namespaceId": "<string>",
"enabled": true,
"range": [
123
],
"ranges": [
[
123,
123
]
]
},
"prerequisites": [
{
"id": "<string>",
"condition": "<string>"
}
],
"savedGroupTargeting": [
{
"savedGroups": [
"<string>"
]
}
]
}
],
"settings": {
"datasourceId": "<string>",
"assignmentQueryId": "<string>",
"experimentId": "<string>",
"segmentId": "<string>",
"queryFilter": "<string>",
"goals": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"secondaryMetrics": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"guardrails": [
{
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
],
"lookbackOverride": {
"value": 123
},
"regressionAdjustmentEnabled": true,
"sequentialTestingEnabled": true,
"sequentialTestingTuningParameter": 123,
"postStratificationEnabled": true,
"decisionFrameworkSettings": {
"decisionCriteriaId": "<string>",
"decisionFrameworkMetricOverrides": [
{
"id": "<string>",
"targetMDE": 123
}
]
},
"metricOverrides": [
{
"id": "<string>",
"windowHours": 123,
"delayHours": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
],
"activationMetric": {
"metricId": "<string>",
"overrides": {
"delayHours": 123,
"windowHours": 123,
"winRiskThreshold": 123,
"loseRiskThreshold": 123,
"properPriorOverride": true,
"properPriorEnabled": true,
"properPriorMean": 123,
"properPriorStdDev": 123,
"regressionAdjustmentOverride": true,
"regressionAdjustmentEnabled": true,
"regressionAdjustmentDays": 123
}
}
},
"ownerEmail": "<string>",
"fallbackAttribute": "<string>",
"disableStickyBucketing": true,
"bucketVersion": 123,
"minBucketVersion": 123,
"resultSummary": {
"status": "<string>",
"winner": "<string>",
"conclusions": "<string>",
"releasedVariationId": "<string>",
"excludeFromPayload": true
},
"publicUrl": "<string>",
"banditScheduleValue": 123,
"banditBurnInValue": 123,
"banditConversionWindowValue": 123,
"linkedFeatures": [
"<string>"
],
"hasVisualChangesets": true,
"hasURLRedirects": true,
"customFields": {},
"customMetricSlices": [
{
"slices": [
{
"column": "<string>",
"levels": [
"<string>"
]
}
]
}
],
"precomputedUnitDimensionIds": [
"<string>"
],
"defaultDashboardId": "<string>",
"templateId": "<string>",
"statusUpdateSchedule": {
"startAt": "2023-11-07T05:31:56Z"
},
"nextScheduledStatusUpdate": {
"type": "start",
"date": "2023-11-07T05:31:56Z"
},
"enhancedStatus": {
"detailedStatus": "<string>"
}
}
}{
"message": "<string>",
"code": "invalid_status",
"details": {
"currentStatus": "<string>",
"expectedStatuses": [
"<string>"
]
}
}
