Jan_Heinonen | 2024-07-12 14:15:55 UTC | #1
In the Knowledge API for guest session there's an option to expand described in the API Toolkit.
GET /api/v2/knowledge/guest/sessions/{sessionId}/categories?expand=Ancestors
But the "Ancestors" doesn't seem to anything.
What is this parameter supposed to do? From the description I'm think it should include all "parents" of an category, but I get the same result with/without the parameter.
Jan_Heinonen | 2024-07-12 14:54:56 UTC | #2
I tested this with
get /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories
and there I get the result I expected with "expand=Ancestors" so I guess it just doesn't work in the Guest Session API.
Result in /api/v2/knowledge/guest/sessions/{sessionId}/categories?expand=Ancestors
{
"id": "ab20726e-bcdd-4697-8b63-48fc7fd14e79",
"name": "Test",
"dateCreated": "2024-07-12T13:19:06.859Z",
"dateModified": "2024-07-12T13:19:06.863Z",
"parentCategory": {
"id": "5e2758d0-1319-4844-8092-4dbecef98139"
}
}
Result in /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/categories?expand=Ancestors
{
"id": "ab20726e-bcdd-4697-8b63-48fc7fd14e79",
"name": "Test",
"dateCreated": "2024-07-12T13:19:06.859Z",
"dateModified": "2024-07-12T13:19:06.863Z",
"parentCategory": {
"id": "5e2758d0-1319-4844-8092-4dbecef98139",
"name": "Insekter",
"parentCategory": {
"id": "726db55e-8882-495c-82b6-3f2c6ef0e993",
"name": "Djur",
"selfUri": "x"
},
"selfUri": "x"
},
"knowledgeBase": {
"id": "x",
"selfUri": "x"
},
"selfUri": "x"
}
system | 2024-08-11 14:50:37 UTC | #3
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 27218