- I want to automatically categorize knowledge base articles. I have built the functionality to download articles, assign categories, and save them back. What I am missing is the ability to get the existing categories for an article. I do not see anything related in the list of jsonws api.
- create a new category
- create a new knowledge base article
- assign the category to the article.
- *Looking for a json-api that will get the existing categories on an article.
- Liferay DXP 7.0
There is an API for it, though it would be under "AssetCategory" in the JSONWS page.
Here is a code snippet showing a retrieval of the AssetEntry for a KBArticle, and on one of the lines we see assetEntry.getCategoryIds(): https://github.com/liferay/liferay-portal/blob/7.0.6-ga7/modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/impl/KBArticleLocalServiceImpl.java#L1322-L1333