Forum Discussion

synthesis's avatar
12 years ago

REST API: Searching a specific area of a community forum.

I'm brand new to using the Lithium API. I've read over the documentation and also searched the boards for an answer to my question. I'm stumped. I'm hoping one of you can help. If I want to get the most recent post from my high-level forum, I can do this: http://h30499.www3.hp.com/restapi/vc/categories/id/bsc-412/posts/recent?page_size=100 This corresponds to this level on the web UI: http://h30499.www3.hp.com/t5/Printing-and-Digital-Imaging/ct-p/bsc-412 Now, how do I just search this level: http://h30499.www3.hp.com/t5/Printers-LaserJet/bd-p/bsc-413 I've tried adding/replacing arguments in the original call but nothing works - I always get an error message. I can't figure out how to drill down into a a "sub-level" of the forum. Can anyone help?
  • Hi synthesis,

     

    It looks like "Printers - LaserJet" is a board, so if you were just swapping into "bsc-413" into your previous REST API call, that won't work because the call you provided is for categories. You can modify it just slightly to get what you want, though:

     

    http://h30499.www3.hp.com/restapi/vc/boards/id/bsc-413/posts/recent?page_size=100

     

    Notice here I've changed "/categories/id" to "/boards/id" and subbed in the board id "bsc-413".

     

    I hope this helps!

2 Replies

  • AdamN's avatar
    AdamN
    Khoros Oracle
    12 years ago

    Hi synthesis,

     

    It looks like "Printers - LaserJet" is a board, so if you were just swapping into "bsc-413" into your previous REST API call, that won't work because the call you provided is for categories. You can modify it just slightly to get what you want, though:

     

    http://h30499.www3.hp.com/restapi/vc/boards/id/bsc-413/posts/recent?page_size=100

     

    Notice here I've changed "/categories/id" to "/boards/id" and subbed in the board id "bsc-413".

     

    I hope this helps!

  • synthesis's avatar
    synthesis
    Guide
    12 years ago
    You rock, dude! This is exactly what I needed. Thank you for such a timely response to my post.