> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-pending-change-requests-for-feature/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Get pending requests for a feature GET https://app.unleash-instance.example.com/api/admin/projects/{projectId}/change-requests/pending/{featureName} **Enterprise feature** This endpoint will retrieve all pending change requests (change requests with a status of Draft | In review | Approved) referencing the given feature flag name. Reference: https://docs.getunleash.io/api/get-pending-change-requests-for-feature ## 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 - `projectId` (string, required) - `featureName` (string, required) ## Response ### 200 changeRequestsSchema - `list of ChangeRequestsSchemaItems` ## Types ### ChangeRequestsSchemaItems A simplified change request overview ### ChangeRequestsSchemaItems0 - `id` (double, required) — This change requests's ID. - `environment` (string, required) — The environment in which the changes should be applied. - `project` (string, required) — The project this change request belongs to. - `features` (list of changeRequestFeatureSchema, required) — The list of features and their changes that relate to this change request. - `segments` (list of changeRequestSegmentChangeSchema, required) — The list of segments and their changes that relate to this change request. - `createdBy` (ChangeRequestsSchemaItemsOneOf0CreatedBy, required) — The user who created this change request. - `createdAt` (string, required) — When this change request was created. - `state` (enum, required) — The current state of the change request. - Allowed values: `Draft`, `In review`, `Approved`, `Applied`, `Cancelled`, `Rejected` - `title` (string, optional) — A title describing the change request's content. - `minApprovals` (double, optional, deprecated) — The minimum number of approvals required before this change request can be applied. - `approvals` (list of changeRequestApprovalSchema, optional, deprecated) — A list of approvals that this change request has received. - `rejections` (list of changeRequestApprovalSchema, optional, deprecated) — A list of rejections that this change request has received. - `comments` (list of changeRequestCommentSchema, optional, deprecated) — All comments that have been made on this change request. ### ChangeRequestsSchemaItems1 - `id` (double, required) — This change requests's ID. - `environment` (string, required) — The environment in which the changes should be applied. - `project` (string, required) — The project this change request belongs to. - `features` (list of changeRequestFeatureSchema, required) — The list of features and their changes that relate to this change request. - `segments` (list of changeRequestSegmentChangeSchema, required) — The list of segments and their changes that relate to this change request. - `createdBy` (ChangeRequestsSchemaItemsOneOf1CreatedBy, required) — The user who created this change request. - `createdAt` (string, required) — When this change request was created. - `state` (enum, required) — The current state of the change request. - Allowed values: `Scheduled` - `schedule` (changeRequestScheduleSchema, required) — A schedule for a change request's application. The schedule can either be pending, failed, or suspended. The schedule will always contain the state of the schedule and the last scheduled time, but other data varies between the different states. - `title` (string, optional) — A title describing the change request's content. - `minApprovals` (double, optional, deprecated) — The minimum number of approvals required before this change request can be applied. - `approvals` (list of changeRequestApprovalSchema, optional, deprecated) — A list of approvals that this change request has received. - `rejections` (list of changeRequestApprovalSchema, optional, deprecated) — A list of rejections that this change request has received. - `comments` (list of changeRequestCommentSchema, optional, deprecated) — All comments that have been made on this change request. ### changeRequestFeatureSchema A feature and all its suggested changes. - `name` (string, required) — The name of the feature - `changes` (list of changeRequestChangeSchema, required) — List of changes inside change request. This list may be empty when listing all change requests for a project. - `conflict` (string, optional) — A string describing the conflicts related to this change. Only present if there are any conflicts on the feature level. - `defaultChange` (changeRequestDefaultChangeSchema, optional) — A description of a default change that will be applied with the change request to prevent invalid states. Default changes are changes that are applied in addition to explicit user-specified changes when a change request is applied. Any default changes are applied in the background and are not a real part of the change request. ### changeRequestSegmentChangeSchema A change request segment change, containing info about the type of segment change and the specific changes. - `id` (double, required) — The ID of this change. - `action` (string, required) — The kind of action that the change contains information about. - `payload` (ChangeRequestSegmentChangeSchemaPayload, required) — The data required to perform this action. - `name` (string, required) — The current name of the segment - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts. - `createdBy` (ChangeRequestSegmentChangeSchemaCreatedBy, optional) — The user who created this change. - `createdAt` (string, optional) — When this change was suggested - `scheduleConflicts` (ChangeRequestSegmentChangeSchemaScheduleConflicts, optional) — Information about scheduled change requests that would casue conflicts with this change if applied. ### ChangeRequestsSchemaItemsOneOf0CreatedBy The user who created this change request. - `username` (string, optional, nullable) - `imageUrl` (string, optional, nullable) — The URL of the user's profile image. ### changeRequestApprovalSchema Information about a [change request](https://docs.getunleash.io/concepts/change-requests) approval. - `createdBy` (ChangeRequestApprovalSchemaCreatedBy, required) — Information about the user who gave this approval. - `createdAt` (string, required) — When the approval was given. ### changeRequestCommentSchema A comment belonging to a [change request](https://docs.getunleash.io/concepts/change-requests). - `text` (string, required) — The content of the comment. - `createdBy` (ChangeRequestCommentSchemaCreatedBy, required) — Information about the user who posted the comment - `createdAt` (string, required) — When the comment was made. - `id` (double, optional) — The comment's ID. Unique per change request. ### ChangeRequestsSchemaItemsOneOf1CreatedBy The user who created this change request. - `username` (string, optional, nullable) - `imageUrl` (string, optional, nullable) — The URL of the user's profile image. ### changeRequestScheduleSchema A schedule for a change request's application. The schedule can either be pending, failed, or suspended. The schedule will always contain the state of the schedule and the last scheduled time, but other data varies between the different states. ### changeRequestChangeSchema A change request change, containing info about the type of change and the specific changes. - `id` (double, required) — The ID of this change. - `action` (string, required) — The kind of action that the change contains information about. - `conflict` (string, optional) — A description of the conflict caused by this change. Only present if there are any conflicts. - `payload` (ChangeRequestChangeSchemaPayload, optional) — The data required to perform this action. - `createdBy` (ChangeRequestChangeSchemaCreatedBy, optional) — The user who created this change. - `createdAt` (string, optional) — When this change was suggested - `scheduleConflicts` (ChangeRequestChangeSchemaScheduleConflicts, optional) — Information about scheduled change requests that would casue conflicts with this change if applied. ### changeRequestDefaultChangeSchema A description of a default change that will be applied with the change request to prevent invalid states. Default changes are changes that are applied in addition to explicit user-specified changes when a change request is applied. Any default changes are applied in the background and are not a real part of the change request. - `action` (string, required) — The kind of action this is. - `payload` (ChangeRequestDefaultChangeSchemaPayload, required) — The necessary data to perform this change. ### ChangeRequestSegmentChangeSchemaPayload The data required to perform this action. ### ChangeRequestSegmentChangeSchemaCreatedBy The user who created this change. - `username` (string, optional, nullable) — The user's username. - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found. ### ChangeRequestSegmentChangeSchemaScheduleConflicts Information about scheduled change requests that would casue conflicts with this change if applied. - `changeRequests` (list of ChangeRequestSegmentChangeSchemaScheduleConflictsChangeRequestsItems, required) — The list of scheduled change requests that would cause conflict with this change. ### ChangeRequestApprovalSchemaCreatedBy Information about the user who gave this approval. - `id` (double, optional) — The ID of the user who gave this approval. - `username` (string, optional) — The approving user's username. - `imageUrl` (string, optional) — The URL where the user's image can be found. ### ChangeRequestCommentSchemaCreatedBy Information about the user who posted the comment - `username` (string, optional, nullable) — The user's username. - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found. ### ChangeRequestScheduleSchema0 A pending schedule for a change request. - `scheduledAt` (string, required) — When this change request will be applied. - `status` (enum, required) — The status of the schedule. - Allowed values: `pending` ### ChangeRequestScheduleSchema1 A failed schedule for a change request. - `scheduledAt` (string, required) — When Unleash last attempted to apply this change request. - `status` (enum, required) — The status of the schedule. - Allowed values: `failed` - `reason` (string, required) — The reason the scheduled failed to apply. - `failureReason` (string, optional, nullable, deprecated) — The reason the scheduled failed to apply. Deprecated in favor of the `reason` property. ### ChangeRequestScheduleSchema2 A suspended schedule for a change request. - `scheduledAt` (string, required) — When Unleash would have attempted to apply this change request if the schedule was not suspended. - `status` (enum, required) — The status of the schedule. - Allowed values: `suspended` - `reason` (string, required) — Why the schedule was suspended. ### ChangeRequestChangeSchemaPayload The data required to perform this action. ### ChangeRequestChangeSchemaCreatedBy The user who created this change. - `username` (string, optional, nullable) — The user's username. - `imageUrl` (string, optional, nullable) — The URL where the user's image can be found. ### ChangeRequestChangeSchemaScheduleConflicts Information about scheduled change requests that would casue conflicts with this change if applied. - `changeRequests` (list of ChangeRequestChangeSchemaScheduleConflictsChangeRequestsItems, required) — The list of scheduled change requests that would cause conflict with this change. ### ChangeRequestDefaultChangeSchemaPayload The necessary data to perform this change. ### ChangeRequestSegmentChangeSchemaScheduleConflictsChangeRequestsItems - `id` (double, required) — The ID of the change request. - `title` (string, optional) — The title of the change request, if any. Only present if there is a title. ### ChangeRequestChangeSchemaScheduleConflictsChangeRequestsItems - `id` (double, required) — The ID of the change request. - `title` (string, optional) — The title of the change request, if any. Only present if there is a title. ## Examples **Response** ```json [ { "approvals": [ { "createdAt": "2022-12-12T12:13:24.218Z", "createdBy": { "id": 33, "imageUrl": "string", "username": "unleash-user" } } ], "comments": [ { "createdAt": "2022-12-12T12:13:24.218Z", "createdBy": { "imageUrl": "string", "username": "unleash-user" }, "id": 33, "text": "This is a comment" } ], "createdAt": "2023-07-31T13:33:02Z", "createdBy": { "imageUrl": "string", "username": "Hunter" }, "environment": "development", "features": [ { "changes": [ { "action": "updateStrategy", "conflict": "Strategy has been deleted", "createdAt": "2023-07-31T13:22:03+02:00", "createdBy": { "imageUrl": "string", "username": "string" }, "id": 33, "payload": {}, "scheduleConflicts": { "changeRequests": [ { "id": 1.1, "title": "string" } ] } } ], "conflict": "Feature has been archived", "defaultChange": { "action": "addStrategy", "payload": { "constraints": [ { "caseInsensitive": false, "contextName": "userId", "inverted": false, "operator": "STR_CONTAINS", "values": [ "ux" ] } ], "disabled": false, "name": "flexibleRollout", "parameters": { "groupId": "my-feature", "rollout": "100", "stickiness": "default" }, "segments": [], "title": "" } }, "name": "my-feature" } ], "id": 3, "minApprovals": 2, "project": "unleash-project", "rejections": [ { "createdAt": "2022-12-12T12:13:24.218Z", "createdBy": { "id": 33, "imageUrl": "string", "username": "unleash-user" } } ], "segments": [ { "action": "updateStrategy", "conflict": "Strategy has been deleted", "createdAt": "2023-07-31T13:22:03+02:00", "createdBy": { "imageUrl": "string", "username": "string" }, "id": 33, "name": "beta-users", "payload": {}, "scheduleConflicts": { "changeRequests": [ { "id": 1.1, "title": "string" } ] } } ], "state": "Draft", "title": "Increasing gradual rollout" } ] ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/pending/featureName" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/pending/featureName'; 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/projectId/change-requests/pending/featureName" 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/projectId/change-requests/pending/featureName") 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/projectId/change-requests/pending/featureName") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/pending/featureName', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/projects/projectId/change-requests/pending/featureName"); 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/projectId/change-requests/pending/featureName")! 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() ```