API page_view_total_reqs route?

I can’t get the Discourse API route /page_view_total_reqs (in the API docs: Discourse API Docs) to work on my instance, throws 404. I wonder if it works for others?

In admin dashboard → reports → consolidated pageviews, the /admin/reports/consolidated_page_views route is called to generate the plot. This route only seems to support html output, I can’t see any JSON call in the background.

The ruby gem GitHub - discourse/discourse_api: Ruby API for Discourse lacks any methods working with pageviews, so I assume /page_view_total_reqs even though documented isn’t supported yet?

Maybe I’m completely missing something obvious. Thanks for any tips!


It works for me if you use the full endpoint admin/reports/page_view_total_reqs and add the auth headers

-H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \
-H "Api-Username: system"
1 Like

Thanks very much @teocomi !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.