Forum Discussion

sdenisov's avatar
13 years ago

Recent Messages for multiple boards - REST api's

Hi,

 

I've been looking through the knowledge base and REST api documentation, and i want to check if what i want to do is possible with only a single API call:

 

To get the most recent messages for only certain boards, in a single call. I've found the threads/recent under boards, however this only seems to give a single board at a time. I thought there might be a way to specify multiple boards in this call, but I cant seem to get it to work, if its even possible at all?

 

I also found a threads/recent for community, however this returns accross all boards, and becuase some of our boards are hidden, i  dont want to return everything.

 

I could of course call the cummunity version and then filter out the boards I dont want, but i want to check there is not something that will give a direct result before heading down this path.

 

does anyone know if this is possible?

 

thanks for your help

 

chris

3 Replies

  • AdamN's avatar
    AdamN
    Khoros Oracle
    13 years ago

    Are the boards you want to filter by grouped by category? If so, you there's a "topics" method on the Category class. For example:

    /categories/id/generaltest/topics

     

  • sdenisov's avatar
    sdenisov
    Adept
    13 years ago

    thanks Adam, I dont think they will be.

     

    I think the answer i'm looking for lies in setting up a custom endpoint. I have been given access to do this and can find it in the admin site we have, i just need to find some documentation on here about how to actually do it.

     

    thanks

     

    Chris

  • AdamN's avatar
    AdamN
    Khoros Oracle
    13 years ago

    Creating a custom endpoint is very similar to creating a custom component in Studio. You can use our REST API to pull in data from the community and use Freemarker to format the output. Here's a post from one of our customers that contains some sample code that they were using for an endpoint:

    http://lithosphere.lithium.com/t5/Developers/How-to-consume-multiple-XML-from-multiple-Rest-API-calls-and/m-p/41650#M1107

     

    Hopefully that will help get you going in the right direction.

     

    Regards,

     

    Adam