AJAX Endpoint Catalog (Legacy to REST Map)
BuddyPress Statistics no longer registers any wp_ajax_* or wp_ajax_nopriv_* actions. Since 2.0.0 every dynamic data call goes through the REST API under the bp-stats/v1 namespace, and the bp_stats_ajax nonce is gone. REST calls send the standard X-WP-Nonce header (nonce action wp_rest).
This page maps each 1.8.x AJAX action to the REST route that replaced it, so an integration written against the old actions can be ported. The full HTTP contract (arguments, enum values, permissions, error codes) lives in the PHP / REST API Reference.
Admin Actions
Section titled “Admin Actions”All admin routes require manage_options.
| 1.8.x AJAX action | REST route (2.0.0+) |
|---|---|
bp_stats_load_dashboard_summary |
GET /admin/dashboard/summary?period= |
bp_stats_load_dashboard_active_users |
GET /admin/dashboard/active-users?period= |
bp_stats_load_dashboard_registered_users |
GET /admin/dashboard/registered-users?period= |
bp_stats_load_dashboard_top_groups |
GET /admin/dashboard/top-groups?period=&limit= |
bp_stats_load_engagement_graph |
GET /admin/charts/engagement?filter= |
bp_stats_load_engagement_trends |
GET /admin/charts/engagement/trends?filter= |
bp_stats_load_usergrowth |
GET /admin/charts/user-growth?filter= |
bp_stats_load_group_activity_graph |
GET /admin/charts/groups/{group_id}/activity?filter=&date= |
bp_stats_load_user_activity_graph |
GET /admin/charts/users/{user_id}/activity?filter= |
bp_stats_load_member_type_data |
GET /admin/charts/member-types |
bp_stats_load_xprofile_field_data |
GET /admin/charts/xprofile/{field_id} |
bp_stats_load_xprofile_multi_field_data |
GET /admin/charts/xprofile/{field_id}/multi |
bp_stats_top_contributor_info |
GET /admin/users/{user_id}/contributions?filter=&date= |
bp_stats_top_groups_contributor_info |
GET /admin/groups/{group_id}/contributors?filter=&date= |
bp_stats_get_activity_logs |
GET /admin/activity-log (DataTables shape when draw is sent) |
bp_stats_json_search_users |
GET /admin/users/search?q= |
bp_stats_get_group |
GET /admin/groups?search= |
bp_stats_get_member_type |
GET /admin/member-types |
bp_stats_get_user_role |
GET /admin/user-roles |
bp_stats_toggle_column |
POST /admin/users/column-visibility (column, visible) |
bp_stats_xprofile_option |
GET /admin/xprofile/fields/{field_id} |
bp_stats_reset_log |
DELETE /admin/activity-log |
bp_stats_full_index_process |
POST /admin/activity-log/reindex (types[], offset, limit) |
bp_stats_get_recent_logs |
GET /admin/activity-log/recent?limit= |
New in 2.0.0 with no AJAX predecessor: GET /admin/pulse and GET /admin/contributors/lifecycle.
Front-End Actions
Section titled “Front-End Actions”Profile, group and widget routes all require a logged-in user, plus the per-route permission check described in the REST reference.
| 1.8.x AJAX action | REST route (2.0.0+) |
|---|---|
bp_stats_load_profile_activity_chart |
GET /profile/{user_id}/activity?filter=&date= |
bp_stats_load_profile_engagement_chart |
GET /profile/{user_id}/engagement?filter=&date= |
bp_stats_load_profile_message_chart |
GET /profile/{user_id}/messages?filter=&date= |
bp_stats_load_profile_group_participation_chart |
GET /profile/{user_id}/group-participation?filter=&date= |
bp_stats_load_member_groups |
GET /profile/{user_id}/groups |
bp_stats_load_group_activity_chart |
GET /groups/{group_id}/activity?filter=&date= |
bp_stats_group_top_contributors_chart |
GET /groups/{group_id}/top-contributors?limit= (or its alias /contributors) |
bp_stats_load_group_top_contributors |
GET /groups/{group_id}/top-contributors?limit= (or its alias /contributors) |
bp_stats_group_growth_chart |
GET /groups/{group_id}/growth?filter=&date= |
bp_stats_load_group_activity_trend |
GET /groups/{group_id}/activity-trend?days= |
bp_stats_load_group_member_growth |
GET /groups/{group_id}/member-growth?days= |
bp_stats_group_engagement_rate_chart |
GET /groups/{group_id}/engagement-rate?days= |
bp_stats_load_chart_widget |
GET /widgets/charts/{type} (member_activities or group_activities) |
bp_stats_modern_widget_data |
GET /widgets/modern/{user_id}?filter= |
bp_stats_widget_sparkline_data |
GET /widgets/sparkline/{user_id}?days= |
New in 2.0.0 with no AJAX predecessor: GET /profile/{user_id}/journey, /impact and /streak.
Porting Notes
Section titled “Porting Notes”- Argument names changed. Old POST fields such as
filter_by,fieldandwidgetare gone. Time windows are nowfilter(chart routes) orperiod(summary, pulse and impact routes), and each is validated against an enum: an unknown value returns400 rest_invalid_param(since 2.0.1). - Response envelopes changed. Most routes return the data object directly rather than
{success, data}. The reindex route is the exception and keeps the{success, data: {finished, next_offset, ...}}envelope its caller expects. - JS wrapper. Plugin scripts call
window.bpStatsApi.get()/.post()/.delete()fromassets/js/api-fetch.js, which reads the root URL and nonce fromwindow.bpStatsRest. - Deprecated PHP stub.
Bp_Stats_Public::bp_stats_load_chart_widget_callback()still exists for code that called it directly, but no AJAX action is hooked to it.
BuddyPress REST Permission Filters
Section titled “BuddyPress REST Permission Filters”The plugin does not add routes to the BuddyPress REST namespace, but it does hook two BuddyPress permission filters (Bp_Stats_Public::bp_stats_set_items_permissions_callback) so that, when a request passes a user_id query param, only that user or an administrator can read it:
bp_rest_friends_get_items_permissions_check-/wp-json/buddypress/v1/friendsbp_rest_notifications_get_items_permissions_check-/wp-json/buddypress/v1/notifications

