# API page\_view\_total\_reqs route?

**URL:** https://meta.discourse.org/t/api-page-view-total-reqs-route/128451
**Category:** Data & reporting
**Created:** [September 12, 2019, 10:05pm UTC](https://meta.discourse.org/t/api-page-view-total-reqs-route/128451 "2019-09-12T22:05:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sckott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sckott/32/115359_2.png) [@sckott](https://meta.discourse.org/u/sckott)
#### Post date: [September 12, 2019, 10:05pm UTC](https://meta.discourse.org/t/api-page-view-total-reqs-route/128451/1 "2019-09-12T22:05:17Z")

</div>

I can’t get the Discourse API route `/page_view_total_reqs` (in the API docs: [Discourse API Docs](https://docs.discourse.org/#tag/Reports%2Fpaths%2F~1page_view_total_reqs%2Fget)) 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 · GitHub](https://github.com/discourse/discourse_api) 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!

---

<div class="post-metadata">

### Author: ![teocomi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/teocomi/32/194916_2.png) [@teocomi](https://meta.discourse.org/u/teocomi)
#### Post date: [September 23, 2020, 3:46pm UTC](https://meta.discourse.org/t/api-page-view-total-reqs-route/128451/2 "2020-09-23T15:46:52Z")

</div>

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

```plaintext
-H "Api-Key: 714552c6148e1617aeab526d0606184b94a80ec048fc09894ff1a72b740c5f19" \
-H "Api-Username: system"

```

---

<div class="post-metadata">

### Author: ![sckott](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sckott/32/115359_2.png) [@sckott](https://meta.discourse.org/u/sckott)
#### Post date: [October 2, 2020, 4:21pm UTC](https://meta.discourse.org/t/api-page-view-total-reqs-route/128451/3 "2020-10-02T16:21:40Z")

</div>

Thanks very much @teocomi !

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [November 1, 2020, 4:27pm UTC](https://meta.discourse.org/t/api-page-view-total-reqs-route/128451/4 "2020-11-01T16:27:30Z")

</div>

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