Forum Discussion

Bhargav1's avatar
10 years ago

messages with body under a thread

Hi,

 

I'm working with Lithium Communities API. Currently I'm getting all the messages under a thread using  http://uxcde46552.stage.lithium.com/restapi/vc/threads/id/271?restapi.session_key=o6rfZfif_3AAOTKQxSxIRKjMYuTh5xXnug5s2Vzo290. 

 

But I'm getting the description body of only first messge and for others i just see messge id's with out any body. So for getting message description again i need to request with respective messge id's which is time consuming. 

 

So is there any API that will render all messages with  body description also for a particular thread requested.? Please do the needful.

 

 

Thanks,

Bhargav

  • PaoloT

     

     

    I found out from some developer communities that using "&restapi.format_detail=full_list_element" at the end fetched me all the messages with body under a thread with Version 1 API itself. Thanks for your support !!!

     

     

    Thanks,

    Bhargav

5 Replies

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    10 years ago

    Hi Bhargav1

     

    have you tried using LiQL for this?

     

    SELECT id,body FROM messages WHERE topic.id = '123'

    This would retrieve id and body of all the messages that are part of the topic with ID 123

     

    Hope it helps,

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)
    10 years ago

    Hi Bhargav1

     

    what you are using currently is our REST API v1. LiQL is a query language that you can use in REST API v2 calls. Have a look at the link I provide to gain an understanding on how to use this webservice. You can find plenty of walktroughs and code examples here as well , or by searching on the Developer Forum.

     

    Hope this helps,

  • Bhargav1's avatar
    Bhargav1
    Guide
    10 years ago

    Hi PaoloT,

     

    It would be very helpful if you can give an example on how can i use that V2 LiQL queries in  REST  webservice calls. Say for example getting messgaes under a thread).

     

     

     

    Thanks,

    Bhargav

  • Bhargav1's avatar
    Bhargav1
    Guide
    10 years ago

    PaoloT

     

     

    I found out from some developer communities that using "&restapi.format_detail=full_list_element" at the end fetched me all the messages with body under a thread with Version 1 API itself. Thanks for your support !!!

     

     

    Thanks,

    Bhargav