Forum Discussion

luk's avatar
luk
Boss
10 years ago

Getting threads a user participated in via REST API?

I'm trying to bild a custom topic/thread list of threads/topics a user has participated in, similar to the one found on the view profile page of a users own profile (which is the component forums.widget.recent-messages). As I guess from the component name, it just displays the users participated topics on the profile page  only and on a "normal" page it actually displays all recent topics, is that correct?

 

That's the content I'd like to get, but there seems to be no way of getting the same via REST API? The only thing close to it is the call to

/restapi/vc/users/id/<userid>/participated/threads/id/<threadid>

which only returns a boolean, an experimental call to

/restapi/vc/users/id/<userid>/participated/threads

returns an error...

 

so my question would be: Is there any API call to get what I'm looking for?

  • Hi luk,

     

    If you want to get the recent posts of the user you can use this call

    /restapi/vc/users/id/<id>/posts

    Alternative, you can also use V2 call.

    SELECT * FROM messages WHERE depth=0 AND author.id='<id>' ORDER BY conversation.last_post_time DESC

     

    Regards,

    Mahesh

    If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."

     

     

  • Hi luk,

     

    If you want to get the recent posts of the user you can use this call

    /restapi/vc/users/id/<id>/posts

    Alternative, you can also use V2 call.

    SELECT * FROM messages WHERE depth=0 AND author.id='<id>' ORDER BY conversation.last_post_time DESC

     

    Regards,

    Mahesh

    If my post is helpful and answers your question, please give "Kudos" and "Accept it as a Solution."