Skip to content

Get FAQs – KG V2

To get a list of questions and nodes under the Knowledge task. This API supports parameters like botId, language, mode (configured/published), and nodeName.

Method GET
Endpoint https://{{host}}/api/public/bot/{{botId}}/v2/faqs?state=&limit=&offset=&nodeName=&withallchild=&type=&language=en
Content Type application/json
Authorization auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Knowledge AI: Manage Knowledge Graph
  • Admin Console: Manage Knowledge Graph

Path Parameters

PARAMETER DESCRIPTION MANDATE
host The environment URL. For example, https://platform.kore.ai/ Required
BotId Bot ID or Stream ID can be accessed under App Settings on the App Profile. Required

Query Parameters

PARAMETER DESCRIPTION MANDATE
state The mode or state of the app - Published or Configured. Required
limit The number of records to be fetched. The default count and the maximum limit is 50. Optional
offset The number of records to be skipped. The default count is set to 0. Optional
nodeName The ID of the nodes in the Knowledge tasks section. Optional
withallchild Whether child nodes need to be included. Accepted conditions are true or false. Optional
type Type of FAQs or tasks to be fetched Optional
language The Bot language that is identified by the language acronym.For example, en for English and de for German. Required
search Used to search the KG using the reference id or display name. Optional

Sample Request

curl --location 'http://localhost/api/public/bot/st-8b87fxxxxx4e90e/v2/faqs?limit=3&offset=0&search=&type=all&language=en&state=configured&nodeName=A&withallchild=true' \
--header 'auth: eyJfxxxxxI6IkpXVCJ9.eyJhcHBJZCI6ImNzLWJjZTZiMfxxxxxNTFkYS1iYjNhLWY5MzkwMDM0Mjg2ZiJ9.40rpnPhnY1CnDPwWfxxxxx'

Sample Response

{
    "faqs": [
        {
            "_id": "673d8ec3c2c0874923ad8a7a",
            "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
            "conditionalResp": false,
            "questionPayload": {
                "question": "Dup AA Node1",
                "tagsPayload": []
            },
            "responseType": "message",
            "answerPayload": [
                {
                    "_id": "mt-979b11e9-7187-5d8a-918b-6b680113119c",
                    "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
                    "channel": "default",
                    "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "createdOn": "Wed Nov 20 2024 12:54:51 GMT+0530 (India Standard Time)",
                    "lModBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "lMod": "Wed Nov 20 2024 12:54:51 GMT+0530 (India Standard Time)",
                    "text": "Sample%20Ans",
                    "type": "basic"
                }
            ],
            "subQuestions": [],
            "subAnswers": [],
            "parent": "492e6eab-8da1-41b9-bc5a-09ccf2013caf",
            "leafterm": "A",
            "createdOn": "2024-11-20T07:24:51.445Z",
            "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "modifiedOn": "2024-11-20T07:24:51.445Z",
            "lastModifiedBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "botName": "Test5",
            "knowledgeTaskId": "673d8c93c2c0874923ad7af1",
            "sortId": 1732087491445,
            "language": "en",
            "faqStatus": true,
            "editLocked": false,
            "isPublished": true,
            "refId": "74e7d27f-bcb1-5dab-a339-957a41582cb1",
            "label": "Dup A Node1",
            "faqLinkedBy": [],
            "__v": 0,
            "fullPath": [
                "Test5",
                "Node1",
                "A"
            ]
        },
        {
            "_id": "673d8e98c2c0874923ad889a",
            "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
            "conditionalResp": false,
            "questionPayload": {
                "question": "Dup A Node1",
                "tagsPayload": []
            },
            "responseType": "message",
            "answerPayload": [
                {
                    "_id": "mt-d0d70fb0-44fb-577d-99d4-1ffc147c5ce3",
                    "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
                    "channel": "default",
                    "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "createdOn": "Wed Nov 20 2024 12:54:08 GMT+0530 (India Standard Time)",
                    "lModBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "lMod": "Wed Nov 20 2024 12:54:08 GMT+0530 (India Standard Time)",
                    "text": "sampke%20ans",
                    "type": "basic"
                }
            ],
            "subQuestions": [],
            "subAnswers": [],
            "parent": "417634bb-33c6-4fb5-8311-177a4f340398",
            "leafterm": "A",
            "createdOn": "2024-11-20T07:24:08.831Z",
            "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "modifiedOn": "2024-11-20T07:24:08.831Z",
            "lastModifiedBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "botName": "Test5",
            "knowledgeTaskId": "673d8c93c2c0874923ad7af1",
            "sortId": 1732087448831,
            "language": "en",
            "faqStatus": true,
            "editLocked": false,
            "isPublished": true,
            "refId": "24850e9f-d899-58d8-ab6f-a9c3a167cc69",
            "label": "Dup A Node1",
            "faqLinkedBy": [],
            "__v": 0,
            "fullPath": [
                "Test5",
                "A"
            ]
        },
        {
            "_id": "673d8ce8c2c0874923ad7f04",
            "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
            "conditionalResp": false,
            "questionPayload": {
                "question": "A Node1",
                "tagsPayload": []
            },
            "responseType": "message",
            "answerPayload": [
                {
                    "_id": "mt-abf1d001-d7a1-5ca0-bf1b-5c707d13c1a4",
                    "streamId": "st-8b873b9c-15cc-5167-a04a-1c801f54e90e",
                    "channel": "default",
                    "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "createdOn": "Wed Nov 20 2024 12:46:56 GMT+0530 (India Standard Time)",
                    "lModBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
                    "lMod": "Wed Nov 20 2024 12:46:56 GMT+0530 (India Standard Time)",
                    "text": "Sample%20Ans",
                    "type": "basic"
                }
            ],
            "subQuestions": [],
            "subAnswers": [],
            "parent": "db9173d7-3611-4bd2-b206-011fe27fa31e",
            "leafterm": "A",
            "createdOn": "2024-11-20T07:16:56.712Z",
            "createdBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "modifiedOn": "2024-11-20T07:16:56.712Z",
            "lastModifiedBy": "u-83c6112b-d759-5e13-8dcf-6995fabb20eb",
            "botName": "Test5",
            "knowledgeTaskId": "673d8c93c2c0874923ad7af1",
            "sortId": 1732087016712,
            "language": "en",
            "faqStatus": true,
            "editLocked": false,
            "isPublished": true,
            "refId": "bce3ee09-c91e-5282-9aed-7cb96a2e2cd7",
            "label": "A Node1",
            "faqLinkedBy": [],
            "__v": 0,
            "fullPath": [
                "Test5",
                "Node1",
                "A"
            ]
        }
    ],
    "moreAvailable": true,
    "count": 41
}