Forum Discussion
Hello Laurent,
As far as I know you can use REST API for achieveing your goal.
For example you can use the following request:
http://%Your Community Name%.stage.lithium.com/restapi/vc/categories/id/%Category Name%/search/messages?page=1&page_size=2&q=is_root:true&restapi.format_detail=full_list_element&sort_by=-topicPostDate
It should return 2 recent topics in the specified category
- Laurent13 years agoContributorThanks a lot.
Would you mind clarifying what the "q" argument achieves?- iahiqosolutions13 years agoAdvisorHi Laurent,
In this particular case parameter "is_root:true" as the value of the "q" parameter is used for returning "root" messages(not replies).
But in general parameter "q" is used for specifying search phrase. For more info you can check the following article:
http://lithosphere.lithium.com/t5/Developers-Knowledge-Base/Working-with-Rest-API-search/ta-p/39942- DougS13 years agoKhoros Oracle
Another good REST query parameter to note is the restapi.response_style parameter. If you add ?restapi.response_style=view to your REST call, you will get an additional attribute on your message and board nodes named view_href. This will contain the URL to the message or board in the community:
http://lidemo.lithium.com/restapi/vc/search/messages?q=phone&restapi.response_style=view