Forum Discussion

Suchith's avatar
6 years ago

API call for Top Most viewed and Most Helpful

Hi,  I want to retrieve Most viewed and Most Helpful data from the posts for that each category category and board level.  Below V2 API will help to get most viewed message across all blogs. S...
  • VikasB's avatar
    6 years ago

    Suchith 
    You can put the board.id constraint in API like this

    select * from messages where board.id = 'BoardId' order by metrics.views DESC limit 3

    And I think helpfulness may relate to the popularity of the topic as I did not see anything else in message response which is closer to this

    select * from messages where board.id = 'BoardID' order by popularity DESC limit 3