Edits a single change in a change request
PUT<your-unleash-url>/api/admin/projects/:projectId/change-requests/:changeRequestId/changes/:changeId
This endpoint will edit one change from a change request if it matches the provided id. The edit removes previous change and inserts a new one. You should not rely on the changeId for subsequent edits and always check the most recent changeId.
Request
Path Parameters
- application/json
Bodyrequired
changeRequestCreateSchema
- oneOf
- MOD1
- MOD2
- MOD3
- MOD4
- MOD5
- MOD6
- MOD7
- MOD8
- MOD9
- MOD10
- MOD11
- MOD12
- MOD13
- MOD14
The name of this action.
Possible values: [updateSegment
]
payload objectrequired
The name of this action.
Possible values: [deleteSegment
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [updateEnabled
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [addStrategy
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [updateStrategy
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [deleteStrategy
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [archiveFeature
]
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [patchVariant
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [reorderStrategy
]
payload object[]required
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [addDependency
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [deleteDependency
]
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [addReleasePlan
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [startMilestone
]
payload objectrequired
The name of the feature that this change applies to.
my-best-feature
The name of this action.
Possible values: [deleteReleasePlan
]
payload objectrequired
Responses
- 200
- 404
changeRequestSchema
- application/json
- Schema
- Example (auto)
Schema
- oneOf
- MOD1
- MOD2
{
"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": "string",
"createdBy": {
"username": "string",
"imageUrl": "string"
},
"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": "string",
"createdBy": {
"username": "string",
"imageUrl": "string"
},
"createdAt": "2023-07-31T13:22:03+02:00",
"name": "beta-users"
}
],
"approvals": [
{
"createdBy": {
"id": 33,
"username": "unleash-user",
"imageUrl": "string"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"rejections": [
{
"createdBy": {
"id": 33,
"username": "unleash-user",
"imageUrl": "string"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"comments": [
{
"id": 33,
"text": "This is a comment",
"createdBy": {
"username": "unleash-user",
"imageUrl": "string"
},
"createdAt": "2022-12-12T12:13:24.218Z"
}
],
"createdBy": {
"username": "Hunter",
"imageUrl": "string"
},
"createdAt": "2023-07-31T13:33:02Z",
"state": "Draft"
}
The requested resource was not found.
- application/json
- Schema
- Example (auto)
Schema
The ID of the error instance
9c40958a-daac-400e-98fb-3bb438567008
The name of the error kind
NotFoundError
A description of what went wrong.
Could not find the addon with ID "12345".
{
"id": "9c40958a-daac-400e-98fb-3bb438567008",
"name": "NotFoundError",
"message": "Could not find the addon with ID \"12345\"."
}
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 PUT '<your-unleash-url>/api/admin/projects/:projectId/change-requests/:changeRequestId/changes/:changeId' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>' \
-d '{
"action": "updateSegment",
"payload": {
"id": 1
}
}'