Forum Discussion

skylinegtr's avatar
10 years ago

API command to pull label

Hello Everyone,

 

I’m going to create a label called “Getting Started” in all of the KB’s. I would like to create an API command to pull anything with the label "Getting Started" from ALL KB boards and listing it in the widget. This should be privilege aware. So anything internally flagged this way should only be visible internally. How can I do this? Are there any sample code that I can use to accomplish this?

 

Any help is greatly appreciated.

Thanks!

  • skylinegtr - This API should return you the topics for requested label. It will show the topics based on the permissions set, please make sure you make the call as rest and not as restadmin

     

    <assign tkbLabels = rest("/categories/id/TKB_CAT_ID/topics/for/labels/text/Getting Started?show_hidden=false") >

     

    You need to list through them and can modify the code as per your requirements. I hope this helps.