Do we have any API or way to get latest post details for a particular Topic in discourse?

Hi,
As mentioned, do we have any API or way to get latest post details for a particular Topic in discourse ?
Also is there any way to get All/Latest/Top posts for a particular Topic in discourse ?

Thanks in adv.

1 Like
2 Likes

I have already checked into docs. Please let me know url if I missed it .

http://docs.discourse.org/#tag/Topics%2Fpaths%2F~1t~1{id}.json%2Fget

1 Like

Thanks. This will get me list of all posts for a particular topic.
My goal : Get a latest post for each topic from a certain category.
Pros: I can get required solution to satisfy my solution.
Cons: Due to multiple API calls for each topic, user experience will get deteriorated by a measurable factor.

Do you have any suggestion or approach to satisfy my above goal ?

You probably want to setup a webhook if your goal is to find out when someone posts to a topic. A webhook can trigger on a new topic creation, new post, or when a new user was created. A webhook will send you a POST request to a specified endpoint that you setup so it will be significantly less api calls.

4 Likes