Release policies (beta)

Update a release policy

PUT
/api/v2/projects/{projectKey}/release-policies/{policyKey}

Update an existing release policy for the specified project.

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

policyKey*string

The human-readable key of the release policy

Header Parameters

LD-API-Version*"beta"

Version of the endpoint.

Value in

  • "beta"

Request Body

application/json

Release policy data to update

scope?
releaseMethod*ReleaseMethod

The release method for this policy

Value in

  • "guarded-release"
  • "immediate-release"
  • "progressive-release"
guardedReleaseConfig?

Configuration for guarded releases

progressiveReleaseConfig?

Configuration for progressive releases

name*string

The name of the release policy

Lengthlength <= 256

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/v2/projects/default/release-policies/production-release" \  -H "LD-API-Version: beta" \  -H "Content-Type: application/json" \  -d '{    "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    }  }'
{  "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"}