Discourse API Reports

(jj11909) #1

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.


(Jeff Atwood) #2

Do we need to rebuild the docs.discourse.org site @blake?

(Blake Erickson) #3

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

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

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

(jj11909) #4


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

(David Taylor) #5

Try adding .json to the end of the URL

(jj11909) #6


I :heart: you

(jj11909) #7

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?

(David Taylor) #8

Are you including an API key in your postman request?

(jj11909) #10


Clearly I have been staring at my screen too long. :man_facepalming:

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.