Skip to content

Powered by Grav + Helios

Dashboard

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

GET /dashboard/stats
Get a summary of site statistics for the dashboard.

Response Codes

200 Success
401 Unauthorized

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

GET /dashboard/popularity
Get page view statistics from the admin popularity tracker.

Response Codes

200 Success
401 Unauthorized

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

GET /dashboard/notifications
Get system notifications grouped by display location (`top`, `dashboard`, `feed`), with a `last_checked` timestamp.

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

200 Success
401 Unauthorized

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

GET /dashboard/feed
Get the latest news feed from getgrav.org.

Response Codes

200 Success
401 Unauthorized

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

POST /dashboard/notifications/{id}/hide
Dismiss a dashboard notification for the current user. Records a timestamp in `user://data/notifications/{username}.yaml` so that notification is filtered out of future `GET /dashboard/notifications` responses.

Parameters

Name Type Description
id required string Notification id (from the `GET /dashboard/notifications` response).

Response Codes

204 Notification dismissed.
401 Unauthorized.
403 Missing `api.system.write` permission.