Release Templates

Add a release plan.

Enterprise feature

Adds a release plan to a specific feature flag and environment.

post/api/admin/projects/{project}/features/{featureName}/environments/{environment}/release-plans

Path parameters

projectstring required
featureNamestring required
environmentstring required

Request body

templateIdstring required

The release plan template's ID. Release template IDs are ulids.

Example request

{
  "templateId": "01JB9GGTGQYEQ9D40R17T3YVW2"
}

Response

#/components/schemas/releasePlanSchema

idstring required

The release plan/template's ID. Release template IDs are ulids.

discriminator'plan' required

A field to distinguish between release plans and release templates.

namestring required

The name of the release template.

descriptionstring nullable

A description of the release template.

featureNamestring required

The name of the feature that uses this release plan.

environmentstring required

The environment that this release plan is for.

createdByUserIdnumber required

Release template: The ID of the user who created this template.

createdAtstring date-time required

The date and time that the release template was created.

activeMilestoneIdstring nullable

The ID of the currently active milestone in this release plan.

releasePlanTemplateIdstring required

The ID of the release plan template that this release plan is based on.

Example response

{
  "id": "01JB9GGTGQYEQ9D40R17T3YVW2",
  "discriminator": "plan",
  "name": "My release plan",
  "description": "This is my release plan",
  "featureName": "my-feature",
  "environment": "production",
  "createdByUserId": 53,
  "createdAt": "2022-01-01T00:00:00Z",
  "activeMilestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1",
  "milestones": [
    {
      "id": "01JB9GGTGQYEQ9D40R17T3YVW1",
      "name": "My milestone",
      "sortOrder": 1,
      "releasePlanDefinitionId": "01JB9GGTGQYEQ9D40R17T3YVW2",
      "startedAt": "2024-01-01T00:00:00.000Z",
      "transitionCondition": {
        "intervalMinutes": 30
      },
      "progressionExecutedAt": "2024-01-01T00:00:00.000Z",
      "pausedAt": "2024-01-01T00:00:00.000Z",
      "strategies": [
        {
          "id": "01JB9GGTGQYEQ9D40R17T3YVW3",
          "milestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1",
          "sortOrder": 9999,
          "title": "Gradual Rollout 25-Prod",
          "name": "flexibleRollout",
          "strategyName": "flexibleRollout",
          "constraints": [
            {
              "values": [
                "1",
                "2"
              ],
              "inverted": false,
              "operator": "IN",
              "contextName": "appName",
              "caseInsensitive": false
            }
          ],
          "variants": [
            {
              "name": "blue_group",
              "weightType": "fix",
              "stickiness": "custom.context.field",
              "payload": {
                "type": "json",
                "value": "{\"color\": \"red\"}"
              }
            }
          ],
          "segments": [
            1,
            2
          ]
        }
      ]
    }
  ],
  "releasePlanTemplateId": "01JB9GGTGQYEQ9D40R17T3YVW2",
  "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"
      }
    }
  ]
}

Changes

Changed in 2 of the 7 revisions of this API.34

    • added the new SEMVER_GTE enum value to the ////// response property for the response status

      response-property-enum-value-added

    • added the new SEMVER_LTE enum value to the ////// response property for the response status

      response-property-enum-value-added

  • 774670258f0414See the full diff
    • added the new REGEX enum value to the ////// response property for the response status

      response-property-enum-value-added

    • added the optional property //// to the response with the status

      response-optional-property-added

    • added the optional property /// to the response with the status

      response-optional-property-added

    • response property milestones/items/strategies/items/strategyName deprecated (stability: stable)

      response-property-deprecated

    • added the required property //// to the response with the status

      response-required-property-added

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog