Forum Discussion

lilim's avatar
lilim
Boss
8 years ago

Get list of TKB articles, exlude TKB comments

I am using the following call to retrieve the TKB articles within a particular node:

 

/restapi/vc/boards/id/<BOARDID>/threads

 

However, this returns both the TKB articles and comments (message), and I only want the high-level TKB article (topic).

 

Is there a way to do this or a better API call I can use?

 

Thank you! :cathappy:

  • PaoloT's avatar
    PaoloT
    Lithium Alumni (Retired)

    Hi lilim

    have you tried with LiQL?

    SELECT * FROM messages WHERE depth=0 AND conversation.style='tkb' AND board.id='thebesttkbever'

    Full documentation here.

    Hope it helps,

    • lilim's avatar
      lilim
      Boss

      Thanks, Paolo! That seemed to work in a small test I did in stage.

       

      I was also able to use this API v1 call for my use case:

       

      /restapi/vc/boards/id/BOARDID/topics?page_size=250