Returns the space counters for a date range — spaces, posts, comments and members — optionally narrowed to one space.
Pass space_id to scope posts, comments and members to a single space; the space total ignores it and always counts community-wide. Status filtering is inconsistent between the two modes: the site-wide post count includes drafts while the per-space count does not.
Endpoint
Method:
GETPath:
/analytics/spaces/widgetEdition: PRO
Controller:
SpacesReportsController@widgetRoute source:
fluent-community-pro/app/Http/Routes/api.php:85Controller source:
fluent-community-pro/app/Http/Controllers/SpacesReportsController.phpRequires the FluentCommunity community-admin permission (or a WordPress super admin).
Requires FluentCommunity Pro.
The period-over-period
comparisonon all four counters is unreliable here, because each previous-period query is built on top of the current-period one; treat onlytotal_recordsas meaningful.
Live sample
The request and response below were recorded against a running FluentCommunity install and then anonymised — member names, emails, avatars and post content are fictional, and long collections are trimmed to a few entries.
GET Get Space Widget Report
Returns the space counters for a date range — spaces, posts, comments and members — optionally narrowed to one space.
Controller: SpacesReportsController@widget
Route source: fluent-community-pro/app/Http/Routes/api.php:85
Authorizations
WordPress Application Passwords — use Basic auth with username:application_password.
Parameters
Query Parameters
Space ID read via $request->getSafe() in widget().
"null"Responses
Successful response