> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-release-plans/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Get release plans GET https://app.unleash-instance.example.com/api/admin/projects/{project}/features/{featureName}/environments/{environment}/release-plans **Enterprise feature** Returns a list of all release plans for a specific feature flag and environment. Reference: https://docs.getunleash.io/api/get-release-plans ## Authentication - `Authorization` header (required) — API key needed to access this API - `Authorization` header (bearer token, required) — API key needed to access this API, in Bearer token format ## Request ### Path parameters - `project` (string, required) - `featureName` (string, required) - `environment` (string, required) ## Response ### 200 #/components/schemas/releasePlansSchema - `list of releasePlanSchema` ## Errors ### 401 Unauthorized Error Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. - `id` (string, optional) — The ID of the error instance - `name` (string, optional) — The name of the error kind - `message` (string, optional) — A description of what went wrong. ## Types ### releasePlanSchema Schema representing the creation of a release plan. - `id` (string, required) — The release plan/template's ID. Release template IDs are ulids. - `discriminator` (enum, required) — A field to distinguish between release plans and release templates. - Allowed values: `plan` - `name` (string, required) — The name of the release template. - `featureName` (string, required) — The name of the feature that uses this release plan. - `environment` (string, required) — The environment that this release plan is for. - `createdByUserId` (double, required) — Release template: The ID of the user who created this template. - `createdAt` (string, required) — The date and time that the release template was created. - `milestones` (list of releasePlanMilestoneSchema, required) — A list of the milestones in this release template. - `releasePlanTemplateId` (string, required) — The ID of the release plan template that this release plan is based on. - `description` (string, optional, nullable) — A description of the release template. - `activeMilestoneId` (string, optional, nullable) — The ID of the currently active milestone in this release plan. - `safeguards` (list of releasePlanSafeguardSchema, optional) — An array of safeguards configured for this release plan. ### releasePlanMilestoneSchema Schema representing the creation of a release plan milestone. - `id` (string, required) — The milestone's ID. Milestone IDs are ulids. - `name` (string, required) — The name of the milestone. - `sortOrder` (integer, required) — The order of the milestone in the release plan. - `releasePlanDefinitionId` (string, required) — The ID of the release plan/template that this milestone belongs to. - `startedAt` (string, optional, nullable) — The date and time when the milestone was started. - `transitionCondition` (ReleasePlanMilestoneSchemaTransitionCondition, optional, nullable) — The condition configuration for the transition. - `progressionExecutedAt` (string, optional, nullable) — The date and time when the milestone progression was executed. - `pausedAt` (string, optional, nullable) — The date and time when the milestone was paused. - `strategies` (list of releasePlanMilestoneStrategySchema, optional) — A list of strategies that are attached to this milestone. ### releasePlanSafeguardSchema A safeguard configuration for a release plan. - `id` (string, required) — The unique ULID identifier for this safeguard - `action` (ReleasePlanSafeguardSchemaAction, required) — The action to take when the safeguard is triggered. - `triggerCondition` (safeguardTriggerConditionSchema, required) — The condition that triggers the safeguard. - `impactMetric` (ReleasePlanSafeguardSchemaImpactMetric, required) — The metric configuration used to evaluate the safeguard condition. ### ReleasePlanMilestoneSchemaTransitionCondition The condition configuration for the transition. ### releasePlanMilestoneStrategySchema Schema representing the creation of a release plan milestone strategy. - `id` (string, required) — The milestone strategy's ID. Milestone strategy IDs are ulids. - `milestoneId` (string, required) — The ID of the milestone that this strategy belongs to. - `sortOrder` (double, required) — The order of the strategy in the list - `name` (string, required) — The name of the strategy type - `strategyName` (string, required, deprecated) — The name of the strategy type - `title` (string, optional, nullable) — A descriptive title for the strategy - `parameters` (map from string to string, optional) — An object containing the parameters for the strategy - `constraints` (list of constraintSchema, optional) — A list of the constraints attached to the strategy. See https://docs.getunleash.io/concepts/activation-strategies#constraints - `variants` (list of createStrategyVariantSchema, optional) — Strategy level variants - `segments` (list of double, optional) — Ids of segments to use for this strategy - `disabled` (boolean, optional, nullable) — A toggle to disable the strategy. defaults to false. Disabled strategies are not evaluated or returned to the SDKs ### ReleasePlanSafeguardSchemaAction The action to take when the safeguard is triggered. - `type` (string, required) — The type of action to perform. - `id` (string, required) — The ID of the release plan this safeguard applies to. ### safeguardTriggerConditionSchema The condition that triggers the safeguard. - `operator` (enum, required) — The comparison operator for the threshold check. - Allowed values: `>`, `<` - `threshold` (double, required) — The threshold value to compare against. ### ReleasePlanSafeguardSchemaImpactMetric The metric configuration used to evaluate the safeguard condition. - `id` (string, required) — The unique identifier for this impact metric - `metricName` (string, required) — The Prometheus metric series to query. It includes both unleash prefix and metric type and display name - `timeRange` (enum, required) — The time range for the metric data. - Allowed values: `hour`, `day`, `week`, `month` - `aggregationMode` (enum, required) — The aggregation mode for the metric data. - Allowed values: `rps`, `count`, `avg`, `sum`, `p95`, `p99`, `p50` - `labelSelectors` (map from string to list of string, required) — The selected labels and their values for filtering the metric data. - `source` (enum, optional) — The Prometheus data source for this metric. Internal is the Unleash-managed Prometheus, external is a customer-provided Prometheus instance. Defaults to internal if not specified. - Allowed values: `internal`, `external` ### constraintSchema A strategy constraint. For more information, refer to [the strategy constraint reference documentation](https://docs.getunleash.io/concepts/activation-strategies#constraints) - `contextName` (string, required) — The name of the context field that this constraint should apply to. - `operator` (enum, required) — The operator to use when evaluating this constraint. For more information about the various operators, refer to [the strategy constraint operator documentation](https://docs.getunleash.io/concepts/activation-strategies#constraint-operators). - Allowed values: `NOT_IN`, `IN`, `STR_ENDS_WITH`, `STR_STARTS_WITH`, `STR_CONTAINS`, `NUM_EQ`, `NUM_GT`, `NUM_GTE`, `NUM_LT`, `NUM_LTE`, `DATE_AFTER`, `DATE_BEFORE`, `SEMVER_EQ`, `SEMVER_GT`, `SEMVER_LT`, `SEMVER_GTE`, `SEMVER_LTE`, `REGEX` - `caseInsensitive` (boolean, optional, default: false) — Whether the operator should be case sensitive or not. Defaults to `false` (being case sensitive). - `inverted` (boolean, optional, default: false) — Whether the result should be negated or not. If `true`, will turn a `true` result into a `false` result and vice versa. - `values` (list of string, optional) — The context values that should be used for constraint evaluation. Use this property instead of `value` for properties that accept multiple values. - `value` (string, optional) — The context value that should be used for constraint evaluation. Use this property instead of `values` for properties that only accept single values. ### createStrategyVariantSchema This is an experimental property. It may change or be removed as we work on it. Please don't depend on it yet. A strategy variant allows you to attach any data to strategies instead of only returning `true`/`false`. Strategy variants take precedence over feature variants. - `name` (string, required) — The variant name. Must be unique for this feature flag - `weight` (integer, required) — The weight is the likelihood of any one user getting this variant. It is an integer between 0 and 1000. See the section on [variant weights](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight) for more information - `weightType` (enum, required) — Set to `fix` if this variant must have exactly the weight allocated to it. If the type is `variable`, the weight will adjust so that the total weight of all variants adds up to 1000. Refer to the [variant weight documentation](https://docs.getunleash.io/concepts/feature-flag-variants#variant-weight). - Allowed values: `variable`, `fix` - `stickiness` (string, required) — The [stickiness](https://docs.getunleash.io/concepts/feature-flag-variants#variant-stickiness) to use for distribution of this variant. Stickiness is how Unleash guarantees that the same user gets the same variant every time - `payload` (CreateStrategyVariantSchemaPayload, optional) — Extra data configured for this variant ### CreateStrategyVariantSchemaPayload Extra data configured for this variant - `type` (enum, required) — The type of the value. Commonly used types are string, number, json and csv. - Allowed values: `json`, `csv`, `string`, `number` - `value` (string, required) — The actual value of payload ## Examples **Response** ```json [ { "id": "01JB9GGTGQYEQ9D40R17T3YVW2", "discriminator": "plan", "name": "My release plan", "featureName": "my-feature", "environment": "production", "createdByUserId": 53, "createdAt": "2022-01-01T00:00:00Z", "milestones": [ { "id": "01JB9GGTGQYEQ9D40R17T3YVW1", "name": "My milestone", "sortOrder": 1, "releasePlanDefinitionId": "01JB9GGTGQYEQ9D40R17T3YVW2", "startedAt": "2024-01-01T00:00:00.000Z", "transitionCondition": {}, "progressionExecutedAt": "2024-01-01T00:00:00.000Z", "pausedAt": "2024-01-01T00:00:00.000Z", "strategies": [ { "id": "01JB9GGTGQYEQ9D40R17T3YVW3", "milestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1", "sortOrder": 9999, "name": "flexibleRollout", "strategyName": "flexibleRollout", "title": "Gradual Rollout 25-Prod", "parameters": { "groupId": "some_new", "rollout": "25", "stickiness": "sessionId" }, "constraints": [ { "contextName": "appName", "operator": "IN", "caseInsensitive": false, "inverted": false, "values": [ "1", "2" ] } ], "variants": [ { "name": "blue_group", "weight": 1, "weightType": "fix", "stickiness": "custom.context.field", "payload": { "type": "json", "value": "{\"color\": \"red\"}" } } ], "segments": [ 1, 2 ], "disabled": false } ] } ], "releasePlanTemplateId": "01JB9GGTGQYEQ9D40R17T3YVW2", "description": "This is my release plan", "activeMilestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1", "safeguards": [ { "id": "01JB9GGTGQYEQ9D40R17T3YVW1", "action": { "type": "pauseReleasePlanProgressions", "id": "01JB9GGTGQYEQ9D40R17T3YVW2" }, "triggerCondition": { "operator": ">", "threshold": 100 }, "impactMetric": { "id": "01JB9GGTGQYEQ9D40R17T3YVW1", "metricName": "unleash_counter_feature_toggle_usage_total", "timeRange": "day", "aggregationMode": "rps", "labelSelectors": { "environment": [ "development" ], "project": [ "default" ] }, "source": "internal" } } ] } ] ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/projects/project/features/featureName/environments/environment/release-plans")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```