Forum Discussion

sylvain_mouquet's avatar
12 years ago

REST API : multiple parameters

I wish to know if it's possible to do something like that :

/restapi/vc/categories/id/1,2


=> returns categorie 1 and categorie 2

 

Thanks in advance,

Sylvain

  • DougS's avatar
    DougS
    Khoros Oracle
    It is not possible to pass multiple category ids to the categories REST call. If those categories are contained in a parent category, you could get all categories within that parent category with a REST call.

    Say the parent category was 3, you would call restapi/vc/categories/id/3/categories (or restapi/vc/categories/id/3/categories/nested to include categories in sub-categories of category 3).

    You can call /restapi/vc/categories/nested to get every category in the community (that the caller has access to view).
    • i do a search like search/messages/?q=test

       

      in the xml result, the <board> is not developped i need to do a second rest api call for getting the content of board element. There is an option for getting the content of the board in only one call ?

      • DougS's avatar
        DougS
        Khoros Oracle

        What information about the board are you looking for?

         

        If you are just looking for the URL to the board then you can get that by including the restapi.response_style=view query parameter in you REST call (from the view_href attribute on the board node which gets added when you add the restapi.response_style=view query parameter to your REST call).

         

        Otherwise you are going to have to make a separate call to get the board info you need (using the href attribute).