Dashboard
Endpoints for dashboard data including statistics, notifications, news feed, and page view popularity.
Endpoints for dashboard data including statistics, notifications, news feed, and page view popularity.
Dashboard Stats
/dashboard/stats
Response Codes
Returns a snapshot of site statistics including page counts, user counts, plugin counts, active theme, Grav/PHP versions, and last backup date.
Page View Statistics
/dashboard/popularity
Response Codes
Returns page view statistics including daily chart data for the last 14 days, summary counters (today, this week, this month), and top 10 pages by total views. Data is sourced from the admin plugin's popularity tracker log files.
Dashboard Notifications
/dashboard/notifications
Parameters
| Name | Type | Description |
|---|---|---|
| location optional | string | Return only one group: `top`, `dashboard`, or `feed`. |
| force optional | boolean | Bypass the cached getgrav.org feed and refetch. |
Response Codes
Returns system notifications grouped by location (feed, dashboard, top), plus a last_checked timestamp. The response combines the getgrav.org feed with notices contributed by plugins through the onApiDashboardNotifications event, then drops any the current user has dismissed — honoring each notice's optional reappear_after interval.
Each notification item carries id, message, and date, plus optional icon (a Lucide name or emoji), title, action ({label, url}), link, type (info, notice, warning, or promo), and reappear_after. The top group renders as a rotating banner above the dashboard; dashboard and feed render in the Notifications widget. Dismiss a notice with POST /dashboard/notifications/{id}/hide.
For the plugin-side recipe — raising a persistent, dismissible banner and the difference between notifications and transient toasts — see Notifications & Toasts in the developer guide.
News Feed
/dashboard/feed
Response Codes
Returns the latest blog posts from the getgrav.org Atom feed. Results are cached and include the 10 most recent articles with title, URL, date, and content snippet.
Hide Notification
/dashboard/notifications/{id}/hide
Parameters
| Name | Type | Description |
|---|---|---|
| id required | string | Notification id (from the `GET /dashboard/notifications` response). |