Admin Area, Users, generate API key
Is there anyway to sort categories by their last_post date and time?
I find a way:
List all categories
Get each categories latest.json
last_posted_atand sort the categories
but I got some problems:
- this is very long and took times and reduce speed
- while getting
last_post_atI got a problem:
I have tested :
and I get a json:
I have checked each topic’s
last_post_atbut they are not sorted and if I want to sort these again it would be very bad.
if you see the
last_post_at(at each photo at bottom right) you can see they are not sorted.
what should I do to sort categories?
As I understand the JSON specs, sort order isn’t ever guaranteed. Arguably Discourse could spit them out in some particular order, but it’s probably safest for your code to sort whatever JSON it gets anyway.
Is there anyway to find the topic_count number of a subcategory?
For example category 38 is subcategory of 30 but I don’t know how to get topic_count of 38?
OR Is there any way to find a category topic_count number including subcategory topics?
Speaking of subcategory, is there a API of it like
/categories.json but with sub categories, as it only show sub id like this
"subcategory_ids": [ 7 ],
I have search for few hours to see if i can find subcategory to get a name of it, No luck, I might have be blind and miss somewhere…Checking new doc that wasn’t there last time I came…
I need a name of sub category for few thing I can use.
Please do let me know about it
Glad to finally see real API docs, thanks for that.
I have been having issues importing the Swagger/OpenAPI definition into Postman. I’ve also asked the Postman community about this. Has anyone done this successfully?
I’m not sure about importing the swagger files, but you should be able to import the postman environment and collection json files into postman.
Wow, right in front of me
Come to think of it, might be good to put those Postman links at the top of the docs page, too.
You can get the full list of categories, including subcategories, from
While I’m making requests, it would be great to get some documentation on the
track_visit query parameter. I’ve seen that used from the API but it isn’t in the docs.
Hey, @oblakeerickson. ReDoc author is here.
You have a really huuuge spec. You event beat our record - your spec is 119 meters tall when rendered by ReDoc
I’ve found a few ReDoc bugs reproducible on your spec. Will try to fix for the next release.
I’ve also noticed you didn’t add your logo to ReDoc. To add it use
x-logo vendor extension.
Maybe you would be interested in our other project GitHub - Rebilly/generator-openapi-repo: 🤖 Yeoman generator for OpenAPI/Swagger repo to help you share spec for your API. It is a tool that helps setting up a repository for OpenAPI spec with a bunch of useful features like validation, splitting spec into smaller manageable chunks and auto-bundling as a CI step.
Let me know if you need any assistance/help with ReDoc. Would be glad to help out
@RomanHotsiy thank you for the work you do on ReDoc and for the tips! I’ll work on those
I fixed most of the
type: null statements and added the discourse logo.
Hi i am able to run the discourse on my local windows system. How can i generate api key
You can generate an API key by going to Admin → API → Generate API Key
Hi! Is there a way to get uncategorized topics? I’m trying to get all topics by passing the category id (:/c/id.json) but in this way I’m missing the uncategorized topics.
site.json you can find
uncategorized_category_id field (mostly it will be
1). Then you can get all uncategorized topics by calling