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.

  • 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

  • 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

    • dhiraj_gophane's avatar
      dhiraj_gophane
      Leader
      Hi Sam,

      I'm using "/kudos/style/idea/messages/leaderboard?page_size=10&max_age=all" this API call.
      I have added max_age parameter because it doesn't work without that.

      I'm passing page_size=10, but I'm getting only 3 Ideas.
      There are more ideas which has kudos.

      Is there any setting which I need to change for this to get remaining Ideas?