Hi folks,
our community has reached a point where we have to bring a bit more order into it. As far as I can see there are two options: More boards or subboards and labels. (We're are using tags already.)
In my opinion labels are easier to implement than subboards. Needful labels can be added or removed in the community admin without any adaptions of the general boardstructure.
But I'm struggling how we can add labels to old threads/posts. Do we have to edit them all or is there another way?
Kind regards for any ideas.
Christoph
Solved! Go to Solution.
Yes @CKummer, unfortunately you would have to edit each individual post to add the label. It would be very manual and time consuming work.
Jason
There are two approach you can follow for existing articles.
1. By editing each and every article and add labels manually.
2. By creating a script which you can run in studio by fetching the list of articles with matching criteria and loop them with add labels query
Add a label to a message by issuing an HTTP POST to the /messages/:messageId/labels sub-collection.
Session Key
curl -X POST \ https://[COMMUNITY DOMAIN]/api/2.0/messages/770/labels \ -H 'content-type: application/json' \ -H 'li-api-session-key: [SESSION KEY]' \ -d '{ "data":{ "type":"label", "text":"electronics" } }'
OAuth
curl -X POST \ https://[COMMUNITY DOMAIN]/api/2.0/messages/770/labels \ -H 'content-type: application/json' \ -H 'Authorization: Bearer [TOKEN]' \ -H 'client-id: [CLIENT ID]' \ -d '{ "data":{ "type":"label", "text":"electronics" } }'
@Parshant That sounds great. We'll check this and hopefully implement the script. Thx!
Thanks for the thorough explanations, I appreciate it.