Analytics endpoints (Admin API)
16 FeatherPanel Admin API endpoints from admin/kpi/analytics.php: methods, paths, auth, permissions, rate limits, parameters and responses.
Last synced from FeatherPanel 15b94e9 on .
On this page
Defined in backend/app/routes/admin/kpi/analytics.php. Authentication used here: Admin. Read Authentication for how to send credentials and Rate limits and errors for the response envelope.
Paths, methods, permissions and rate limits come from the route file. Summaries, parameters and response codes come from the OpenAPI annotations on the controllers; endpoints without annotations show only what the route file declares.
Endpoints
GET/api/admin/analytics/overview
Get the KPI overview for a date range Growth against the previous period, active users, module counts, node capacity and overcommit, top consumers, tickets and activity. Disabled modules are left out.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
from | query | string (date) | no | First day (Y-m-d). Defaults to 29 days before "to". |
to | query | string (date) | no | Last day (Y-m-d). Defaults to today. |
curl -X GET "$PANEL_URL/api/admin/analytics/overview" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Overview retrieved successfully · 400 Invalid date range · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/overview
Get user analytics overview Retrieve comprehensive overview of user statistics including total, active, banned, verified, and 2FA enabled users.
Response data: UserAnalyticsOverview
Response data field | Type | Description |
|---|---|---|
total | integer | Total user count |
active | integer | Active users (not banned) |
banned | integer | Banned users |
verified | integer | Email verified users |
two_fa_enabled | integer | Users with 2FA enabled |
unverified | integer | Unverified users |
percentage_verified | number (float) | Percentage of verified users |
percentage_banned | number (float) | Percentage of banned users |
percentage_two_fa | number (float) | Percentage of users with 2FA |
curl -X GET "$PANEL_URL/api/admin/analytics/users/overview" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 User analytics overview retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/by-role
Get user distribution by roles Retrieve user distribution across different roles with counts and percentages.
Response data field | Type | Description |
|---|---|---|
total_users | integer | Total number of users |
roles | RoleDistribution[] |
curl -X GET "$PANEL_URL/api/admin/analytics/users/by-role" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 User role distribution retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/registration-trend
Get user registration trend Retrieve user registration trends over a specified time period.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | integer | no | Number of days to look back (default: 30) |
Response data field | Type | Description |
|---|---|---|
period_days | integer | Number of days in the period |
data | RegistrationTrend[] | |
total_new_users | integer | Total new users in the period |
curl -X GET "$PANEL_URL/api/admin/analytics/users/registration-trend" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Registration trend retrieved successfully · 400 Bad request - Invalid days parameter · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/top-by-servers
Get top users by server count Retrieve the users with the most servers.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Number of top users to retrieve (default: 10) |
Response data field | Type | Description |
|---|---|---|
limit | integer | Limit applied |
users | TopUser[] |
curl -X GET "$PANEL_URL/api/admin/analytics/users/top-by-servers" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Top users retrieved successfully · 400 Bad request - Invalid limit parameter · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/activity
Get user activity summary Retrieve user activity summary for a specified time period.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
hours | query | integer | no | Number of hours to look back (default: 24) |
Response data field | Type | Description |
|---|---|---|
period_hours | integer | Number of hours in the period |
new_users | integer | New users in the period |
active_users | integer | Active users in the period |
curl -X GET "$PANEL_URL/api/admin/analytics/users/activity" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 User activity retrieved successfully · 400 Bad request - Invalid hours parameter · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/dashboard
Get comprehensive user analytics dashboard Retrieve all user analytics data in a single comprehensive dashboard view.
Response data field | Type | Description |
|---|---|---|
overview | UserAnalyticsOverview | |
by_role | object | User distribution by role |
registration_trend_7d | object | 7-day registration trend |
registration_trend_30d | object | 30-day registration trend |
top_users | object | Top users by server count |
activity_24h | object | 24-hour activity summary |
activity_7d | object | 7-day activity summary |
curl -X GET "$PANEL_URL/api/admin/analytics/users/dashboard" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Analytics dashboard retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/banned
Get banned users statistics Retrieve statistics and information about banned users.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Number of recent banned users to retrieve (default: 20) |
Response data field | Type | Description |
|---|---|---|
total_banned | integer | Total number of banned users |
recent_banned_users | object[] | Recently banned users |
ban_trend_30d | object[] | 30-day ban trend |
curl -X GET "$PANEL_URL/api/admin/analytics/users/banned" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Banned users statistics retrieved successfully · 400 Bad request - Invalid limit parameter · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/security
Get user security statistics Retrieve statistics about user security features (2FA, email verification).
Response data field | Type | Description |
|---|---|---|
total_users | integer | Total number of users |
two_fa_enabled | integer | Users with 2FA enabled |
email_verified | integer | Users with verified email |
fully_secured | integer | Users with both 2FA and email verified |
not_secured | integer | Users with neither 2FA nor email verified |
percentage_two_fa | number (float) | Percentage with 2FA |
percentage_email_verified | number (float) | Percentage with verified email |
percentage_fully_secured | number (float) | Percentage fully secured |
percentage_not_secured | number (float) | Percentage not secured |
curl -X GET "$PANEL_URL/api/admin/analytics/users/security" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Security statistics retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/users/growth
Get user growth rate statistics Retrieve user growth rate statistics comparing recent periods.
Response data field | Type | Description |
|---|---|---|
last_7_days | integer | New users in last 7 days |
previous_7_days | integer | New users in previous 7 days |
growth_rate_7d | number (float) | 7-day growth rate percentage |
last_30_days | integer | New users in last 30 days |
previous_30_days | integer | New users in previous 30 days |
growth_rate_30d | number (float) | 30-day growth rate percentage |
curl -X GET "$PANEL_URL/api/admin/analytics/users/growth" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Growth rate statistics retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/trend
Get activity trend over time Retrieve activity trends for a specified time period.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | integer | no | Number of days to look back (default: 7) |
curl -X GET "$PANEL_URL/api/admin/analytics/activity/trend" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Activity trend retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/top
Get top activities by type Retrieve the most common activity types.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Number of top activities to retrieve (default: 10) |
curl -X GET "$PANEL_URL/api/admin/analytics/activity/top" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Top activities retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/breakdown
Get activity breakdown by type Retrieve activity distribution for pie chart visualization.
curl -X GET "$PANEL_URL/api/admin/analytics/activity/breakdown" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Activity breakdown retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/recent
Get recent activities Retrieve recent user activities with user information.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
limit | query | integer | no | Number of recent activities to retrieve (default: 20) |
curl -X GET "$PANEL_URL/api/admin/analytics/activity/recent" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Recent activities retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/stats
Get activity statistics summary Retrieve overall activity statistics.
curl -X GET "$PANEL_URL/api/admin/analytics/activity/stats" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Activity statistics retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions
GET/api/admin/analytics/activity/hourly
Get hourly activity distribution Retrieve activity distribution by hour for heatmap visualization.
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
days | query | integer | no | Number of days to look back (default: 7) |
curl -X GET "$PANEL_URL/api/admin/analytics/activity/hourly" \
-H "Authorization: Bearer $FEATHERPANEL_API_KEY" \
-H "Accept: application/json"Responses: 200 Hourly activity retrieved successfully · 401 Unauthorized · 403 Forbidden - Insufficient permissions