> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.getunleash.io/api/get-lifecycle-trends/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getunleash.io/_mcp/server. # Get lifecycle trends GET https://app.unleash-instance.example.com/api/admin/insights/lifecycle **Enterprise feature** Gets lifecycle trends information showing feature flag progression across development, production, and cleanup stages. Reference: https://docs.getunleash.io/api/get-lifecycle-trends ## 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 ### Query parameters - `projects` (string, optional) — Comma-separated list of project IDs to filter lifecycle trends ## Response ### 200 lifecycleTrendsSchema - `lifecycleTrends` (LifecycleTrendsSchemaLifecycleTrends, required) — Aggregated view of feature flag lifecycle across environments ## Types ### LifecycleTrendsSchemaLifecycleTrends Aggregated view of feature flag lifecycle across environments - `develop` (LifecycleTrendsSchemaLifecycleTrendsDevelop, required) - `production` (LifecycleTrendsSchemaLifecycleTrendsProduction, required) - `cleanup` (LifecycleTrendsSchemaLifecycleTrendsCleanup, required) ### LifecycleTrendsSchemaLifecycleTrendsDevelop - `totalFlags` (double, required) - `medianDaysInCurrentStage` (double, required) - `medianDaysHistorically` (double, required) - `categories` (LifecycleTrendsSchemaLifecycleTrendsDevelopCategories, required) ### LifecycleTrendsSchemaLifecycleTrendsProduction - `totalFlags` (double, required) - `medianDaysInCurrentStage` (double, required) - `medianDaysHistorically` (double, required) - `categories` (LifecycleTrendsSchemaLifecycleTrendsProductionCategories, required) ### LifecycleTrendsSchemaLifecycleTrendsCleanup - `totalFlags` (double, required) - `medianDaysInCurrentStage` (double, required) - `medianDaysHistorically` (double, required) - `categories` (LifecycleTrendsSchemaLifecycleTrendsCleanupCategories, required) ### LifecycleTrendsSchemaLifecycleTrendsDevelopCategories - `experimental` (LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental, required) - `release` (LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease, required) - `permanent` (LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent, required) ### LifecycleTrendsSchemaLifecycleTrendsProductionCategories - `experimental` (LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental, required) - `release` (LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease, required) - `permanent` (LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent, required) ### LifecycleTrendsSchemaLifecycleTrendsCleanupCategories - `experimental` (LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental, required) - `release` (LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease, required) - `permanent` (LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent, required) ### LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ### LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent - `flagsOlderThanWeek` (double, required) - `newFlagsThisWeek` (double, required) ## Examples **Response** ```json { "lifecycleTrends": { "develop": { "totalFlags": 35, "medianDaysInCurrentStage": 28, "medianDaysHistorically": 25, "categories": { "experimental": { "flagsOlderThanWeek": 15, "newFlagsThisWeek": 13 }, "release": { "flagsOlderThanWeek": 13, "newFlagsThisWeek": 0 }, "permanent": { "flagsOlderThanWeek": 7, "newFlagsThisWeek": 0 } } }, "production": { "totalFlags": 10, "medianDaysInCurrentStage": 14, "medianDaysHistorically": 12, "categories": { "experimental": { "flagsOlderThanWeek": 2, "newFlagsThisWeek": 5 }, "release": { "flagsOlderThanWeek": 2, "newFlagsThisWeek": 1 }, "permanent": { "flagsOlderThanWeek": 3, "newFlagsThisWeek": 0 } } }, "cleanup": { "totalFlags": 5, "medianDaysInCurrentStage": 16, "medianDaysHistorically": 18, "categories": { "experimental": { "flagsOlderThanWeek": 0, "newFlagsThisWeek": 3 }, "release": { "flagsOlderThanWeek": 0, "newFlagsThisWeek": 1 }, "permanent": { "flagsOlderThanWeek": 1, "newFlagsThisWeek": 0 } } } } } ``` **SDK Code** ```python import requests url = "https://app.unleash-instance.example.com/api/admin/insights/lifecycle" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/insights/lifecycle'; 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/insights/lifecycle" 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/insights/lifecycle") 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/insights/lifecycle") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/insights/lifecycle', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/insights/lifecycle"); 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/insights/lifecycle")! 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() ```