Hi all
Is there a way to get a category’s id by either it’s name or slug? I’ve got an admin area that needs to post to discourse when a record is edited.
I’ve found the /categories.json call but that will grow over time and I don’t want to have to iterate over the results.
Anyone got any ideas?
Thanks
Matt
https://meta.discourse.org/c/dev/show.json (Open in a new tab)
The JS uses the information at /site.json for the list of “all categories that I’m allowed to know about”. (It’s just inserted into the HTML instead of requested at that URL.)