Forum Discussion

phoneboy's avatar
phoneboy
Director
4 years ago

How to query the pre-defined labels for a given board?

The API documentation is quite obtuse on something that the admin UI shows me quite easily: the labels that are pre-defined in a specific community.
You know: the ones that show here: 

According to the developer documentation for the v2 API: https://developer.khoros.com/khoroscommunitydevdocs/reference/boards-1 
you can only specify the pre-defined labels when you create the community.
Oddly, the documentation doesn't list a way to just query the parameters of an existing board, but if I do a GET against https://community-domain/api/2.0/boards/board-id, it provides most of the parameters but NOT the pre-defined labels.

When I check the v1 API, I can see that boards/id/my-board-id/labels will actually list the labels.
Which works great...if some message in that board actually uses the label.

So...how do you query the API to return this list of pre-defined labels?

  • I guess I should have read down a little further in the docs: boards/id/my-board-id/labels/predefined will do that.
    I wish we could get more things moved over to the v2 API, it's a little easier to work with and has significantly better documentation.