Knowledge V2 - APIs

Hello,

I am looking to dip into the the Knowledge APIs and retrieve categories and labels based off of a specific search. I'm using this endpoint /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/search and would expect there to be some "Expand" parameters that would allow me to get those values.

I am looking to do this, because I want to drive my routing based off of what category the Knowledge content is. Alternatively, it would be nice if those values for labels and categories were exposed in an Architect Bot Flow so we didn't need to dip into the API.

Anyone have any thoughts?

Thanks,
Peter

Hi @78692638d4a24645fbf5

First off it's worth noting that the Knowledge API has resources that are still being implemented, so features that aren't here now may be in the works.

I can see the use case for this. You can create a post for this idea in the Genesys Ideas Portal

For now you could do client-side filtering to get only the documents with a certain category. If you're using a data action, this post may give you some ideas.

Thanks Jacob.

To your point about doing client side filtering. I don't think I coudl do that, because the category object is not coming back in the response body for any of the Get Document requests. I'll wait until that's fully released to see if it's there or not.

The response for GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents contains an array categories. You can check in the link by viewing API Responses -> 200 successful operation. I was also able to independently verify it with a request. The same goes for GET /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/languages/{languageCode}/documents/{documentId}

If you're not seeing the categories, I would think that means there aren't any categories associated with the document

Ah, I see. You're using a different endpoint than I was testing with. I missed that one.

Thanks again!