No Community Name in /site.json

AI-generated summary

In a discussion titled “No Community Name in /site.json” under the Dev category and tagged with rest-api, everwall reported that the /site.json endpoint lacks a “community_name” field, which they need to integrate Discourse into their Everwall app. They proposed workarounds like parsing the tag from /latest.rss or scraping the homepage HTML. JammyDodger suggested checking /about.json, which everwall confirmed contains the needed information. everwall also expressed a desire for better developer documentation listing all default endpoints, noting they’ve had to rely on scattered forum posts and Postman examples. JammyDodger acknowledged the docs at https://docs.discourse.org/ are incomplete and invited contributions via https://meta.discourse.org/t/contribute-to-the-discourse-api-docs/56693, also recommending https://meta.discourse.org/t/reverse-engineer-the-discourse-api/20576 for reverse-engineering API behavior when needed.

I’m not sure if this is a bug, or by design, but inside /site.json, there is no “community_name” variable or similar so that our app can get the name of the community.

For context, we’re adding support for Discourse to Everwall so that our customers can add an API key and then we monitor tags for new posts and allow them to pull them into their social walls or social media hubs on their website.

While we could just ask the user adding Discourse for the name of the community, I was hoping we could hit one of the “.json” endpoints to get this information.

From what I can tell, I have two options:

  1. Call /latest.rss (yes, the RSS feed), and then parse it out of the tag.
  2. Scrape the homepage HTML tag and parse it.

Is this information missing in /site.json by design? Is it somewhere else that I haven’t found yet?

Any help here would be appreciated.

I’m on my phone, so it’s not as easy for me to check, but is it available in the /about.json?

It is! Thank you, I didn’t even know that endpoint existed.

If there was one critique: I wish there were better developer docs, specifically some that listed all the default endpoints available. Everything so far has been me googling and finding some random note within someone else’s post, or some random person’s Postman.

Excellent. :slight_smile:

We do have https://docs.discourse.org/, though there are some endpoints that aren’t covered (there’s a guide here if anyone is feeling generous enough to help add some :slight_smile: Contributing to the Discourse API documentation)

I think the other advice is to Reverse engineer the Discourse API if you’re trying to replicate something (though this may not cover all scenarios, depending on what info you’re trying to surface).