Forum Discussion

schung's avatar
schung
Guide
11 years ago

Fetching list of boards using API

I'm trying to get a list of all boards in a given node.

 

Call

mycommunity.com/restapi/vc/boards?xslt=json.xsl&restapi.session_key=SESSION_KEY

 Result

{"response":{"status":"success","boards":null}}

 

That is not the expected result, and I can call the following without a problem:

mycommunity.com/restapi/vc/boards/id/BOARD_ID/threads?xslt=json.xsl&restapi.session_key=SESSION_KEY

 And I get the intended result.

 

My question is, why can't I fetch a list of boards even though I can make other board level API calls?

 

Thanks in advance!

  • schung - you need to use following call to get all the boards from root level. 

     

    /restapi/vc/boards/nested?xslt=json.xsl

     

    Your API didn't return anything because your community didn't have any boards directly under the root, every board in your must be inside the categories, if you create a boards on the root, then your call will return that in result.

     

    I hope this helps.

  • schung - you need to use following call to get all the boards from root level. 

     

    /restapi/vc/boards/nested?xslt=json.xsl

     

    Your API didn't return anything because your community didn't have any boards directly under the root, every board in your must be inside the categories, if you create a boards on the root, then your call will return that in result.

     

    I hope this helps.