Forum Discussion

luk's avatar
luk
Boss
10 years ago

Why does a v1 API Call to /boards not include groups?

EDIT2/SOLUTION: Yeah, just ignore the rest of the post^^... =) that's when you don't set up your community structure yourself...the groups had the checkbox "hidden from menus" checked in their properties...that's why they don't show up in the /boards call, but interstingly the still do in the /groups/list call...so to make it short, don't make them hidden if you want the groups via /boards API call...sorry for the spam...This "Important: Hidden boards are filtered out of the response by default unless you specifically query the hidden board by its ID (the id field)." from Board Resource brought me on the right track of what was the problem.

 

SuzieH It seems that the board resource of the v2 API now supports groups (they show up with the v2 call below when I removed the hidden checkbox, in the KB-Article linked above it says "API v2 does not support review boards or group boards.")

 

I just noticed a quite strange behavior of the Lithium v1 REST API:

 

we can get a list of all boards in the community by calling

http://your.community.tld/restapi/vc/boards/nested

that returns a list of boards of (almost) all types (by type I mean interaction styles), e.g. forums, blogs, ideas, tkbs, qandas but NOT groups...

 

we can get a list of groups with

http://your.community.tld/restapi/vc/groups/list

// or just

http://your.community.tld/restapi/vc/groups

// I prefer the first call though, the response is better structured IMO

where we will get a list of groups with their respective href urls which look like follows:

<group type="group" href="/boards/id/Groupname">

that tells me that a "Group" is actually also a board resource, but probably with a different interaction_style (e.g. "group")...which is confirmed when we call

http://your.community.tld/restapi/vc/boards/id/<groupname>

which returns a normal board node with interaction_style = group 

<interaction_style type="string">group</interaction_style>

 

so my question would be, why these boards with interaction_style = group are not listed in the API call that should return all boards?

 

The absence of these boards in the /boards/nested call forces me to make unnecessary API calls and complicate the code =)...any insights in why this is the case would be intersting!

 

 EDIT: Just out of curiosity I tried the same with the v2 API Browser:

SELECT title,conversation_style FROM boards

// I do not output everything to make the response a bit more readable in this test...feel free to replace "title,conversation_style" with "*"...

// btw. why is it called "conversation_style" in v2 and "interaction_style in v1?

the result is the same...NO groups in the response...

No RepliesBe the first to reply