Forum Discussion

sdujari's avatar
sdujari
Mentor
10 years ago

How can I use Rest API to pull all articles from a specific TKB?

I would like to pull all articles from a specific board (based on its ID) using the Rest API.

 

Right now we are using the following:

 

<#assign resources = rest("search/messages?q=${productName?url}&location=board:${productID}CustomerStories&restapi.format_detail=full_list_element&restapi.response_style=view&search_type=thread&filter=location,includeTkbs&include_tkbs=true").messages />

 

${productID}CustomerStories is the ID of the board I am pulling from. The ${productName} variable is from some old code when we were filtering by label and I would like to build this exact same query but without using that unneccesary variable.

  • Try following
    /restapi/vc/boards/id/[id]/topics/style/tkb/recent
    /restapi/vc/boards/id/[id]/posts/style/tkb/recent
  • Try following
    /restapi/vc/boards/id/[id]/topics/style/tkb/recent
    /restapi/vc/boards/id/[id]/posts/style/tkb/recent
    • sdujari's avatar
      sdujari
      Mentor

      GrazittiI 

       

      Thanks again for your help!

       

      I would like to pull the content in a way that provides me the body (specifically for the Q&A template because I am creating an FAQ page). Would Rest API call would I use that would include a "body" variable?

      • sdujari's avatar
        sdujari
        Mentor

        VarunGrazitti I think I tagged the wrong account, any thoughts on the question I asked before? I figured out how to get the body of my tkb article but right now I'm trying to find a way to check if an article is listed as "Featured" or not. Thanks!!