Forum Discussion

dhiraj_gophane's avatar
11 years ago

Rest call for "Top kudoed Ideas"

Hi,   How can we fetch "Top kudoed Ideas" using rest api? I need a community level rest call.
  • samudhraa's avatar
    11 years ago

    Hi Dhiraj ,

     

    If you have Ideas as a separate board , then you can get the popular threads within that board. This would give you the top kudoed ideas.

     

    If you have a collection of boards under one category , you can either iterate over each board within the category and make the popular threads or use the kudos leaderboard.

    /boards/id/[id] /threads/popular

    or

    /boards/id/[id] /kudos/style/[dummy] /messages/leaderboard

     

    If you want it across community , then you can use the kudos leaderboard for they style of 'ideas'

    /kudos/style/[dummy] /messages/leaderboard

    I believe the above would be a better solution.

     

    As a final option ,you can use a global search to get messages that have kudos ,and then sort them programatically. But this could be tedious.

    /search/messages?q=is_root:true&has_kudos=true

     

     

    Hope that helps.

     

    Thanks,

    Sam