Get instance information
GET <your-unleash-url>/api/admin/insights
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Gets high level information about the usage of this Unleash instance, including user, project, and flag information.
Request
Query Parameters
- from string
The beginning of the date range in yyyy-MM-dd format
- to string
The end of the date range in yyyy-MM-dd format
Responses
- 200
instanceInsightsSchema
- application/json
- Schema
- Example (from schema)
Schema
userTrends object[]required
flagTrends object[]required
projectFlagTrends object[]required
metricsSummaryTrends object[]required
environmentTypeTrends object[]required
{
"userTrends": [
{
"date": "2024-01-12T23:59:59.999Z",
"total": 100,
"active": 98,
"inactive": 2
}
],
"flagTrends": [
{
"date": "2024-01-12T23:59:59.999Z",
"total": 100,
"active": 98,
"stale": 0,
"potentiallyStale": 2
}
],
"projectFlagTrends": [
{
"week": "2024-40",
"project": "default",
"health": 50,
"timeToProduction": 10,
"date": "2024-01-12T23:59:59.999Z",
"total": 100,
"active": 98,
"stale": 0,
"potentiallyStale": 2,
"users": 30
}
],
"metricsSummaryTrends": [
{
"week": "2024-01",
"date": "2024-01-12T23:59:59.999Z",
"project": "default",
"totalRequests": 50,
"totalYes": 50,
"totalNo": 50,
"totalApps": 50,
"totalFlags": 50,
"totalEnvironments": 50
}
],
"environmentTypeTrends": [
{
"date": "2024-01-12T23:59:59.999Z",
"week": "2024-01",
"environmentType": "production",
"totalUpdates": 50
}
]
}
Authorization
name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
Request
Request
curl / cURL
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
python / requests
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
go / native
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
nodejs / native
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
ruby / Net::HTTP
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
csharp / httpclient
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
php / cURL
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
java / OkHttp
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'
powershell / RestMethod
curl -L -X GET '<your-unleash-url>/api/admin/insights' \
-H 'Accept: application/json' \
-H 'Authorization: <API_KEY_VALUE>'