# 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 ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get lifecycle trends version: endpoint_adminUi.getLifecycleTrends paths: /api/admin/insights/lifecycle: get: operationId: get-lifecycle-trends summary: Get lifecycle trends description: >- **Enterprise feature** Gets lifecycle trends information showing feature flag progression across development, production, and cleanup stages. tags: - - subpackage_adminUi parameters: - name: projects in: query description: Comma-separated list of project IDs to filter lifecycle trends required: false schema: type: string - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: lifecycleTrendsSchema content: application/json: schema: $ref: '#/components/schemas/lifecycleTrendsSchema' components: schemas: LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsDevelopCategories: type: object properties: experimental: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesExperimental release: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesRelease permanent: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsDevelopCategoriesPermanent required: - experimental - release - permanent LifecycleTrendsSchemaLifecycleTrendsDevelop: type: object properties: totalFlags: type: number format: double medianDaysInCurrentStage: type: number format: double medianDaysHistorically: type: number format: double categories: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsDevelopCategories required: - totalFlags - medianDaysInCurrentStage - medianDaysHistorically - categories LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsProductionCategories: type: object properties: experimental: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesExperimental release: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesRelease permanent: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsProductionCategoriesPermanent required: - experimental - release - permanent LifecycleTrendsSchemaLifecycleTrendsProduction: type: object properties: totalFlags: type: number format: double medianDaysInCurrentStage: type: number format: double medianDaysHistorically: type: number format: double categories: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsProductionCategories required: - totalFlags - medianDaysInCurrentStage - medianDaysHistorically - categories LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent: type: object properties: flagsOlderThanWeek: type: number format: double newFlagsThisWeek: type: number format: double required: - flagsOlderThanWeek - newFlagsThisWeek LifecycleTrendsSchemaLifecycleTrendsCleanupCategories: type: object properties: experimental: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesExperimental release: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesRelease permanent: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsCleanupCategoriesPermanent required: - experimental - release - permanent LifecycleTrendsSchemaLifecycleTrendsCleanup: type: object properties: totalFlags: type: number format: double medianDaysInCurrentStage: type: number format: double medianDaysHistorically: type: number format: double categories: $ref: >- #/components/schemas/LifecycleTrendsSchemaLifecycleTrendsCleanupCategories required: - totalFlags - medianDaysInCurrentStage - medianDaysHistorically - categories LifecycleTrendsSchemaLifecycleTrends: type: object properties: develop: $ref: '#/components/schemas/LifecycleTrendsSchemaLifecycleTrendsDevelop' production: $ref: '#/components/schemas/LifecycleTrendsSchemaLifecycleTrendsProduction' cleanup: $ref: '#/components/schemas/LifecycleTrendsSchemaLifecycleTrendsCleanup' required: - develop - production - cleanup lifecycleTrendsSchema: type: object properties: lifecycleTrends: $ref: '#/components/schemas/LifecycleTrendsSchemaLifecycleTrends' description: Aggregated view of feature flag lifecycle across environments required: - lifecycleTrends ``` ## SDK Code Examples ```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() ```