How to find REST api result sets
Hi,
I need to display latest topic with number of views, kudos, replies and ratings in the custom component. I just checked and found an API rest("threads/recent?restapi.response_style=view&page_size=6").
So here i have a doubt,
1) How can i find the result set with respective of api return?
2) Where i can get to know the list of existing REST api?
You can hit the API in the browser to check the result of V1 API.
Here is the API documentation(V1 &V2)
https://community.lithium.com/t5/Developer-Documentation/bd-p/dev-doc-portal
You basically enter the following URL in your browser: https://<your.community.url>/restapi/vc/threads/recent?restapi.response_style=view&page_size=6 (if you prefer a JSON output add &restapi.response_format=json to the URL) to see the output, from there you have to go down the rabbit hole of the different properties of the returned object/node(s) and read them with FreeMarker, note that attribute values are referenced with object.item.@attribute...
regarding the docs, check the link above.