Rest call to get most active forum topics across community
Is there a REST call that will let me get the most commented on forum topics for a time period, that only pulls from forums, but can pull from all the forums in a community? We need "the most active" topics pulled into a widget. We are doing something similar with getting most replies to any posts, but it only pulls from a certain category, and pulls from all types of posts. We did that using this:
categories/id/[id]/search/messages?q=is_root:true&sort_by=-replies&rangeTime=1M&restapi.response_style=view&restapi.format_detail=full_list_element
If we could get the same stuff back, but for only topics and across the whole community, that would be great.
Thanks in advance for any help.
There's a search context for the community level too, so if you remove the category context you get something like:
/search/messages?q=is_root:true&sort_by=-replies&rangeTime=1M&restapi.response_style=view&restapi.format_detail=full_list_element
To get only results from forums, you can use the "include_forums" query string parameter and set the value to true:
/search/messages?q=is_root:true&sort_by=-replies&rangeTime=1M&restapi.response_style=view&restapi.format_detail=full_list_element&include_forums=true
For example: