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:
- Call /latest.rss (yes, the RSS feed), and then parse it out of the tag.
- 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
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.
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 Contribute to the Discourse API Docs 📜)
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).
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.