This endpoint will update the state of a change request
Enterprise feature
This endpoint will update the state of a change request if the business rules allow it. The state can be one of the following: Draft, In review, Approved, Cancelled, Applied. In order to be approved, the change request must have at least one change and the number of approvals must be greater than or equal to the number of approvals required for the environment.
Once a change request has been approved, it can be applied. Once a change request has been applied, it cannot be changed. Once a change request has been cancelled, it cannot be changed. Any change to a change request in the state of Approved will result in the state being set to In Review and the number of approvals will be reset.
Path parameters
Response
changeRequestSchema
Example response
{
"id": 3,
"title": "Increasing gradual rollout",
"environment": "development",
"minApprovals": 2,
"project": "unleash-project",
"features": [
{
"name": "my-feature",
"conflict": "Feature has been archived",
"changes": [
{
"id": 33,
"action": "updateStrategy",
"conflict": "Strategy has been deleted",
"payload": [
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"sortOrder": 1
}
],
"createdAt": "2023-07-31T13:22:03+02:00"
}
],
"defaultChange": {
"action": "addStrategy",
"payload": {
"name": "flexibleRollout",
"title": "",
"disabled": false,
"segments": [],
"parameters": {
"groupId": "my-feature",
"rollout": "100",
"stickiness": "default"
},
"constraints": [
{
"values": [
"ux"
],
"inverted": false,
"operator": "STR_CONTAINS",
"contextName": "userId",
"caseInsensitive": false
}
]
}
}
}
],
"segments": [
{
"id": 33,
"action": "updateStrategy",
"conflict": "Strategy has been deleted",
"payload": [
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"sortOrder": 1
}
],
"createdAt": "2023-07-31T13:22:03+02:00",
"name": "beta-users"
}
],
"approvals": [
{
"createdBy": {
"id": 33,
"username": "unleash-user"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"rejections": [
{
"createdBy": {
"id": 33,
"username": "unleash-user"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"comments": [
{
"id": 33,
"text": "This is a comment",
"createdBy": {
"username": "unleash-user"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"createdBy": {
"username": "Hunter"
},
"createdAt": "2023-07-31T13:33:02Z",
"stateTimestamps": {
"Draft": "2023-07-31T13:33:02Z",
"In review": "2023-08-01T10:15:30Z",
"Approved": "2023-08-02T09:01:00Z"
}
}Changes
Changed in 1 of the 7 revisions of this API.11
- ▲
added
subschema #1subschema #2to the response bodyoneOflist for the response statusresponse-body-one-of-added
- ○
removed
subschema #1subschema #2from the response bodyoneOflist for the response statusresponse-body-one-of-removed
This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲