# Discourse API Reports

**URL:** https://meta.discourse.org/t/discourse-api-reports/72383
**Category:** Support
**Created:** [October 19, 2017, 12:31am UTC](https://meta.discourse.org/t/discourse-api-reports/72383 "2017-10-19T00:31:00Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [October 19, 2017, 12:31am UTC](https://meta.discourse.org/t/discourse-api-reports/72383/1 "2017-10-19T00:31:00Z")

</div>

Hello!  
I am trying to use the reporting functionality found in the Discourse api via a node app on a different server.

When I issue my requests (whether on the server or in postman) I get a 404 that the url was not found?

Is this function depreceated or still around? Can’t seem to figure it out.

> **[Discourse API Docs](https://docs.discourse.org/#tag/Reports%2Fpaths%2F~1page_view_total_reqs%2Fget)**

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [October 19, 2017, 2:20am UTC](https://meta.discourse.org/t/discourse-api-reports/72383/2 "2017-10-19T02:20:35Z")

</div>

Do we need to rebuild the [docs.discourse.org](http://docs.discourse.org) site @blake?

---

<div class="post-metadata">

### Author: ![blake](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blake/32/157322_2.png) [@blake](https://meta.discourse.org/u/blake)
#### Post date: [October 19, 2017, 2:57am UTC](https://meta.discourse.org/t/discourse-api-reports/72383/3 "2017-10-19T02:57:24Z")

</div>

No the doc site is working just fine, but the url for that endpoint may have been documented wrong 😊.

@jordan1909 can you try hitting this endpoint on your site?

 ![55 PM](https://global.discourse-cdn.com/meta/original/3X/a/b/abaed815935ac7158c607a26db8f5c4d73c19835.png)

Looks like you will need to include `/admin/reports` and all correct params

---

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [October 19, 2017, 1:26pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/4 "2017-10-19T13:26:06Z")

</div>

@blake

So this works in my browser but I need to get the JSON data back for usage elsewhere and everytime I issue the query anywhere else I get a raw dump of the page?

Any idea what I’m missing? Issuing a GET request here.

Postman URL

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [October 19, 2017, 1:33pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/5 "2017-10-19T13:33:07Z")

</div>

Try adding `.json` to the end of the URL

---

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [October 19, 2017, 1:34pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/6 "2017-10-19T13:34:07Z")

</div>

@david

I ❤ you

---

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [November 1, 2017, 8:11pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/7 "2017-11-01T20:11:47Z")

</div>

I had previously marked this as solved however if I execute the request via Postman or in an Ajax query I am getting a 404. Is this available to the api for external calls? Am I missing something?

Does anyone have an example of getting this value via an Ajax request or even Postman?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [November 1, 2017, 8:24pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/8 "2017-11-01T20:24:30Z")

</div>

Are you including an API key in your postman request?

---

<div class="post-metadata">

### Author: ![jordan1909](https://avatars.discourse-cdn.com/v4/letter/j/9f8e36/32.png) [@jordan1909](https://meta.discourse.org/u/jordan1909)
#### Post date: [November 1, 2017, 8:27pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/10 "2017-11-01T20:27:01Z")

</div>

@david

Clearly I have been staring at my screen too long. 🤦‍♂️

I take it the value is api\_key not ap\_key.

I’ll go hide in the corner and think about what I’ve done.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [June 8, 2024, 12:43pm UTC](https://meta.discourse.org/t/discourse-api-reports/72383/11 "2024-06-08T12:43:58Z")

</div>

This topic was automatically closed after 2424 days. New replies are no longer allowed.
