/u.json not working

AI-generated summary

The discussion revolves around the functionality of /u.json and similar endpoints on Meta Discourse. AstonJ initially questions why https://meta.discourse.org/u.json and https://meta.discourse.org/u?period=monthly.json do not work, receiving an error or access denial. Canapin clarifies that the correct URL should be https://meta.discourse.org/directory_items.json?period=monthly&order=likes_received, referencing the API documentation. codinghorror explains that the URLs must be appended to valid working endpoints. AstonJ confirms the corrected URL still doesn’t work, but Canapin shows it works for them. codinghorror suggests that Ember routing might interfere, and advises pasting the URL directly into a new tab. AstonJ confirms this resolves the issue, thanking both contributors.

Should these work? I thought you could add .json to the end of any URL?

https://meta.discourse.org/u.json

{“errors”:[“The requested URL or resource could not be found.”],“error_type”:“not_found”}

https://meta.discourse.org/u?period=monthly.json

Access Denied

while trying to load /directory_items?period=monthly.json&order=likes_received

Something went wrong.

I believe the correct url is https://meta.discourse.org/directory_items.json?period=monthly&order=likes_received

See Discourse API Docs

Those are not valid URLs at all, you must add the extension to a valid working URL.

That’s not working either :confused:

What is the valid URL? The one in @Canapin’s post/API Docs does not work either..

It’s working for me:

Sometimes the plain text routes have to be opened in a new tab to work because of Ember routing. Maybe that’s what you are running into? Try copying and pasting the URL into the address bar of your browser.

Ah that was it - pasting the URL into a new tab and it works :+1:

Thanks both!