curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'LD-API-Version: <ld-api-version>' \
--data '
{
"releaseMethod": "guarded-release",
"scope": {
"environmentKeys": [
"production",
"staging"
],
"flagTagKeys": [
"frontend",
"backend"
],
"viewKeys": [
"feature-a",
"team-a"
]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"guardedReleaseConfig": {
"metricKeys": [
"http-errors",
"latency"
],
"rolloutContextKindKey": "user",
"metricGroupKeys": [
"frontend-metrics",
"backend-metrics"
],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
},
"key": "production-release"
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies"
payload = {
"releaseMethod": "guarded-release",
"scope": {
"environmentKeys": ["production", "staging"],
"flagTagKeys": ["frontend", "backend"],
"viewKeys": ["feature-a", "team-a"]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"guardedReleaseConfig": {
"metricKeys": ["http-errors", "latency"],
"rolloutContextKindKey": "user",
"metricGroupKeys": ["frontend-metrics", "backend-metrics"],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": True
},
"key": "production-release"
}
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'LD-API-Version': '<ld-api-version>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
releaseMethod: 'guarded-release',
scope: {
environmentKeys: ['production', 'staging'],
flagTagKeys: ['frontend', 'backend'],
viewKeys: ['feature-a', 'team-a']
},
progressiveReleaseConfig: {
rolloutContextKindKey: 'user',
stages: [
{allocation: 25000, durationMillis: 60000},
{allocation: 25000, durationMillis: 60000}
]
},
name: 'Production Release',
guardedReleaseConfig: {
metricKeys: ['http-errors', 'latency'],
rolloutContextKindKey: 'user',
metricGroupKeys: ['frontend-metrics', 'backend-metrics'],
minSampleSize: 100,
stages: [
{allocation: 25000, durationMillis: 60000},
{allocation: 25000, durationMillis: 60000}
],
rollbackOnRegression: true
},
key: 'production-release'
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies', 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://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies",
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([
'releaseMethod' => 'guarded-release',
'scope' => [
'environmentKeys' => [
'production',
'staging'
],
'flagTagKeys' => [
'frontend',
'backend'
],
'viewKeys' => [
'feature-a',
'team-a'
]
],
'progressiveReleaseConfig' => [
'rolloutContextKindKey' => 'user',
'stages' => [
[
'allocation' => 25000,
'durationMillis' => 60000
],
[
'allocation' => 25000,
'durationMillis' => 60000
]
]
],
'name' => 'Production Release',
'guardedReleaseConfig' => [
'metricKeys' => [
'http-errors',
'latency'
],
'rolloutContextKindKey' => 'user',
'metricGroupKeys' => [
'frontend-metrics',
'backend-metrics'
],
'minSampleSize' => 100,
'stages' => [
[
'allocation' => 25000,
'durationMillis' => 60000
],
[
'allocation' => 25000,
'durationMillis' => 60000
]
],
'rollbackOnRegression' => true
],
'key' => 'production-release'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"LD-API-Version: <ld-api-version>"
],
]);
$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://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies"
payload := strings.NewReader("{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("LD-API-Version", "<ld-api-version>")
req.Header.Add("Authorization", "<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.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}"
response = http.request(request)
puts response.read_body{
"releaseMethod": "guarded-release",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"scope": {
"environmentKeys": [
"production",
"staging"
],
"flagTagKeys": [
"frontend",
"backend"
],
"viewKeys": [
"feature-a",
"team-a"
]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"rank": 1,
"_id": "550e8400-e29b-41d4-a716-446655440000",
"guardedReleaseConfig": {
"metricKeys": [
"http-errors",
"latency"
],
"rolloutContextKindKey": "user",
"metricGroupKeys": [
"frontend-metrics",
"backend-metrics"
],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
},
"key": "production-release"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Create a release policy
Create a new release policy for the specified project.
curl --request POST \
--url https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--header 'LD-API-Version: <ld-api-version>' \
--data '
{
"releaseMethod": "guarded-release",
"scope": {
"environmentKeys": [
"production",
"staging"
],
"flagTagKeys": [
"frontend",
"backend"
],
"viewKeys": [
"feature-a",
"team-a"
]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"guardedReleaseConfig": {
"metricKeys": [
"http-errors",
"latency"
],
"rolloutContextKindKey": "user",
"metricGroupKeys": [
"frontend-metrics",
"backend-metrics"
],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
},
"key": "production-release"
}
'import requests
url = "https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies"
payload = {
"releaseMethod": "guarded-release",
"scope": {
"environmentKeys": ["production", "staging"],
"flagTagKeys": ["frontend", "backend"],
"viewKeys": ["feature-a", "team-a"]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"guardedReleaseConfig": {
"metricKeys": ["http-errors", "latency"],
"rolloutContextKindKey": "user",
"metricGroupKeys": ["frontend-metrics", "backend-metrics"],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": True
},
"key": "production-release"
}
headers = {
"LD-API-Version": "<ld-api-version>",
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'LD-API-Version': '<ld-api-version>',
Authorization: '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
releaseMethod: 'guarded-release',
scope: {
environmentKeys: ['production', 'staging'],
flagTagKeys: ['frontend', 'backend'],
viewKeys: ['feature-a', 'team-a']
},
progressiveReleaseConfig: {
rolloutContextKindKey: 'user',
stages: [
{allocation: 25000, durationMillis: 60000},
{allocation: 25000, durationMillis: 60000}
]
},
name: 'Production Release',
guardedReleaseConfig: {
metricKeys: ['http-errors', 'latency'],
rolloutContextKindKey: 'user',
metricGroupKeys: ['frontend-metrics', 'backend-metrics'],
minSampleSize: 100,
stages: [
{allocation: 25000, durationMillis: 60000},
{allocation: 25000, durationMillis: 60000}
],
rollbackOnRegression: true
},
key: 'production-release'
})
};
fetch('https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies', 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://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies",
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([
'releaseMethod' => 'guarded-release',
'scope' => [
'environmentKeys' => [
'production',
'staging'
],
'flagTagKeys' => [
'frontend',
'backend'
],
'viewKeys' => [
'feature-a',
'team-a'
]
],
'progressiveReleaseConfig' => [
'rolloutContextKindKey' => 'user',
'stages' => [
[
'allocation' => 25000,
'durationMillis' => 60000
],
[
'allocation' => 25000,
'durationMillis' => 60000
]
]
],
'name' => 'Production Release',
'guardedReleaseConfig' => [
'metricKeys' => [
'http-errors',
'latency'
],
'rolloutContextKindKey' => 'user',
'metricGroupKeys' => [
'frontend-metrics',
'backend-metrics'
],
'minSampleSize' => 100,
'stages' => [
[
'allocation' => 25000,
'durationMillis' => 60000
],
[
'allocation' => 25000,
'durationMillis' => 60000
]
],
'rollbackOnRegression' => true
],
'key' => 'production-release'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json",
"LD-API-Version: <ld-api-version>"
],
]);
$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://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies"
payload := strings.NewReader("{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("LD-API-Version", "<ld-api-version>")
req.Header.Add("Authorization", "<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.post("https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies")
.header("LD-API-Version", "<ld-api-version>")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.launchdarkly.com/api/v2/projects/{projectKey}/release-policies")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["LD-API-Version"] = '<ld-api-version>'
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"releaseMethod\": \"guarded-release\",\n \"scope\": {\n \"environmentKeys\": [\n \"production\",\n \"staging\"\n ],\n \"flagTagKeys\": [\n \"frontend\",\n \"backend\"\n ],\n \"viewKeys\": [\n \"feature-a\",\n \"team-a\"\n ]\n },\n \"progressiveReleaseConfig\": {\n \"rolloutContextKindKey\": \"user\",\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ]\n },\n \"name\": \"Production Release\",\n \"guardedReleaseConfig\": {\n \"metricKeys\": [\n \"http-errors\",\n \"latency\"\n ],\n \"rolloutContextKindKey\": \"user\",\n \"metricGroupKeys\": [\n \"frontend-metrics\",\n \"backend-metrics\"\n ],\n \"minSampleSize\": 100,\n \"stages\": [\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n },\n {\n \"allocation\": 25000,\n \"durationMillis\": 60000\n }\n ],\n \"rollbackOnRegression\": true\n },\n \"key\": \"production-release\"\n}"
response = http.request(request)
puts response.read_body{
"releaseMethod": "guarded-release",
"_access": {
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [
null,
null
],
"notResources": [
"notResources",
"notResources"
],
"effect": "allow",
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
]
},
"action": "action"
}
]
},
"scope": {
"environmentKeys": [
"production",
"staging"
],
"flagTagKeys": [
"frontend",
"backend"
],
"viewKeys": [
"feature-a",
"team-a"
]
},
"progressiveReleaseConfig": {
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
},
"name": "Production Release",
"rank": 1,
"_id": "550e8400-e29b-41d4-a716-446655440000",
"guardedReleaseConfig": {
"metricKeys": [
"http-errors",
"latency"
],
"rolloutContextKindKey": "user",
"metricGroupKeys": [
"frontend-metrics",
"backend-metrics"
],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
},
"key": "production-release"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}{
"code": "code",
"message": "message"
}Authorizations
Headers
Version of the endpoint.
beta Path Parameters
The project key
Body
Release policy to create
The release method for this policy
guarded-release, immediate-release, progressive-release The name of the release policy
256"Production Release"
The human-readable key of the release policy
"production-release"
Show child attributes
Show child attributes
{
"environmentKeys": ["production", "staging"],
"flagTagKeys": ["frontend", "backend"],
"viewKeys": ["feature-a", "team-a"]
}
Configuration for guarded releases
Show child attributes
Show child attributes
{
"metricKeys": ["http-errors", "latency"],
"rolloutContextKindKey": "user",
"metricGroupKeys": ["frontend-metrics", "backend-metrics"],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
}
Configuration for progressive releases
Show child attributes
Show child attributes
{
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
}
Response
Release policy created successfully
The unique identifier of the release policy
"550e8400-e29b-41d4-a716-446655440000"
The rank/priority of the release policy
1
The release method for this policy
guarded-release, immediate-release, progressive-release The name of the release policy
256"Production Release"
The human-readable key of the release policy
"production-release"
Show child attributes
Show child attributes
{
"allowed": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
],
"denied": [
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
},
{
"reason": {
"role_name": "role_name",
"notActions": [null, null],
"notResources": ["notResources", "notResources"],
"effect": "allow",
"resources": ["proj/*:env/*;qa_*:/flag/*"],
"actions": ["*"]
},
"action": "action"
}
]
}
Show child attributes
Show child attributes
{
"environmentKeys": ["production", "staging"],
"flagTagKeys": ["frontend", "backend"],
"viewKeys": ["feature-a", "team-a"]
}
Configuration for guarded releases
Show child attributes
Show child attributes
{
"metricKeys": ["http-errors", "latency"],
"rolloutContextKindKey": "user",
"metricGroupKeys": ["frontend-metrics", "backend-metrics"],
"minSampleSize": 100,
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
],
"rollbackOnRegression": true
}
Configuration for progressive releases
Show child attributes
Show child attributes
{
"rolloutContextKindKey": "user",
"stages": [
{
"allocation": 25000,
"durationMillis": 60000
},
{
"allocation": 25000,
"durationMillis": 60000
}
]
}