Create a release template.
POST<your-unleash-url>/api/admin/release-plan-templates
Creates and returns a release template.
Responses
- 200
- 401
#/components/schemas/releasePlanTemplateSchema
- application/json
- Schema
- Example (auto)
Schema
idstringrequired
The release plan/template's ID. Release template IDs are ulids.
Example:
01JB9GGTGQYEQ9D40R17T3YVW2
discriminatorstringrequired
A field to distinguish between release plans and release templates.
Possible values: [template
]
Example:
template
namestringrequired
The name of the release template.
Example:
My release plan
descriptionstringnullable
A description of the release template.
Example:
This is my release plan
createdByUserIdnumberrequired
Release template: The ID of the user who created this template.
Example:
53
createdAtdate-timerequired
The date and time that the release template was created.
Example:
2022-01-01T00:00:00Z
milestones object[]
{
"id": "01JB9GGTGQYEQ9D40R17T3YVW2",
"discriminator": "template",
"name": "My release plan",
"description": "This is my release plan",
"createdByUserId": 53,
"createdAt": "2022-01-01T00:00:00Z",
"milestones": [
{
"id": "01JB9GGTGQYEQ9D40R17T3YVW1",
"name": "My milestone",
"sortOrder": 1,
"releasePlanDefinitionId": "01JB9GGTGQYEQ9D40R17T3YVW2",
"strategies": [
{
"id": "01JB9GGTGQYEQ9D40R17T3YVW3",
"milestoneId": "01JB9GGTGQYEQ9D40R17T3YVW1",
"sortOrder": 9999,
"title": "Gradual Rollout 25-Prod",
"strategyName": "flexibleRollout",
"parameters": {
"groupId": "some_new",
"rollout": "25",
"stickiness": "sessionId"
},
"constraints": [
{
"values": [
"1",
"2"
],
"inverted": false,
"operator": "IN",
"contextName": "appName",
"caseInsensitive": false
}
],
"variants": [
{
"name": "blue_group",
"weight": 0,
"weightType": "fix",
"stickiness": "custom.context.field",
"payload": {
"type": "json",
"value": "{\"color\": \"red\"}"
}
}
],
"segments": [
1,
2
]
}
]
}
]
}
Authorization information is missing or invalid. Provide a valid API token as the authorization
header, e.g. authorization:*.*.my-admin-token
.
- application/json
- Schema
- Example (auto)
Schema
idstring
The ID of the error instance
Example:
9c40958a-daac-400e-98fb-3bb438567008
namestring
The name of the error kind
Example:
AuthenticationRequired
messagestring
A description of what went wrong.
Example:
You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login.
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "AuthenticationRequired",
"message": "You must log in to use Unleash. Your request had no authorization header, so we could not authorize you. Try logging in at /auth/simple/login."
}
Authorization: Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST '<your-unleash-url>/api/admin/release-plan-templates' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
ResponseClear