Forum Discussion

Jk07's avatar
Jk07
Adept
2 years ago

Post Details

How to get Particular post details.

like no. of posts ,kudos,views,author and replies.

 

this data should be based on a particular post id.

2 Replies

  • Jk07 The details can be fetched via below API

    Select kudos.sum(weight),metrics.views,author,replies.count(*) from messages where id='POST_ID'

     

    To get the replies to the post, use - 

    SELECT * FROM messages WHERE parent.id = 'POST_ID'

     

  • Hello Jk07 ,

    The solution provided by kkritika is working fine. Another query to retrieve kudos for a specific message ID is: 

    SELECT * FROM kudos WHERE message.id = 'MESSAGE_ID'

    If my response helped you, please give kudo and accept as solution.
    Thank you!