akashm
3 years agoMentor
How to set predefined-only while creating GroupHub
So, I am in an interesting scenario:
- I want to create a Group Hub --> Easy enough to create using the REST API Endpoints
- I want to have Forum + Calendar + TKB created within the Group Hub --> Same as above
- I want to make sure that the Boards under the Group Hub have `predefined-only` labels when creating topics on the boards. --> This seems not possible
What I tried doing was I tried using the Update Board API to enforce `allowed_labels` to `predefined-only` only to see that the API does not allow this change on Update.
So, my question is how do I set `predefined-only` for the boards under GroupHubs?
I did a little bit of testing, and I was able to set this setting using API v1 on an individual Idea Exchange within the Group Hub:
GET /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels * Returned "freeform-only" POST /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels/set * value=predefined-only GET /restapi/vc/boards/id/xxx/settings/name/label.allowed_labels * Returned "predefined-only"
After doing this, I did see the labels being enforced in the "New Idea" flow. I was not able to work with the group hub itself in API v1, and I did not get a chance to try API v2, but I assume that it would work in the same way.
Let me know how that goes!