Forum Discussion

jaikumar1's avatar
jaikumar1
Mentor
8 years ago

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 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.

  • 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.