To get a list of questions and nodes under the Knowledge task.
| Method | GET | 
| Endpoint | https://{{host}}/api/public/bot/{{botId}}/faqs?ktId=&limit=&offset=&parentId=&withallchild=&type=&language=en | 
| Content Type | application/json | 
| Authorization | auth: {{JWT}} | 
| API Scope | 
 | 
Path Parameters
| Parameter | Description | Mandate | 
|---|---|---|
| host | The environment URL. For example, https://bots.kore.ai | Required | 
| BotId | Bot ID or Stream ID can be accessed under General Settings on the Bot Builder. | Required | 
Query Parameters
| Parameter | Description | Mandate | 
|---|---|---|
| ktId | The Knowledge task ID based on which the FAQs are listed. You can retrieve the ktId from the request of the GetFAQs API call. Learn more. Note: The ktId values are different for both in-development and published bots. | 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 0. | Optional | 
| parentId | The ID of the nodes in the Knowledge tasks section. You can retrieve the parentId from the response of the GetFAQs API call. Learn more. | Optional | 
| withallchild | Whether child nodes need to be included | Optional | 
| type | Type of FAQs to be fetched. | Optional | 
| language | The Bot language which is identified by the language acronym. For example, en for English and de for German. The user can set the default language of the bot. | Required | 
| search | Used to search the KG using the reference id or display name. | Optional | 
Sample Request
curl -X GET \
  'https://{{host}}/api/public/bot/{{bot_id}}/faqs?ktId=5afxxxxxf&limit=30&offset=0&parentId=xxxxx-xxx-xxx-xxx-xxxxx&withallchild=true&type=all&language=en' \
  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
  -H 'content-type: application/json'  
Body Parameters
No body parameters are passed.
Sample Response
{
    "faqs": [
        {
            "_id": "5exxxxxxxxxxxxxxxxxxxxxx",
            "subAnswers": [],
            "editLocked": false,
            "isPublished": true,
            "questionPayload": {
                "question": "What is Bank Internet Banking?",
                "tagsPayload": []
            },
            "answerPayload": [
                {
                    "_id": "mt-95xxxxxx-9xxa-5xxe-97xx-56xxxxxxxxxx",
                    "channel": "default",
                    "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx",
                    "lModBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
                    "lMod": "Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)",
                    "createdBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
                    "createdOn": "Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)",
                    "text": "Bank Internet banking is a convenient way to bank anytime, anywhere even from the comfort of your home using your PC or Tab.",
                    "type": "basic"
                }
            ],
            "knowledgeTaskId": "5axxxxxxxxxxxxxxxxxxxxxx",
            "subQuestions": [],
            "responseType": "message",
            "referenceId" :"12xxx32",
            "label" :"displayname",
            "streamId": "st-xxxxx-xxx-xxx-xxx-xxxxx",
            "parent": "pa-xxxxx-xxx-xxx-xxx-xxxxx",
            "leafterm": "yes",
            "language": "en",
            "createdBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
            "lastModifiedBy": "u-xxxxx-xxx-xxx-xxx-xxxxx",
            "createdOn": "2020-01-03T07:41:03.017Z",
            "modifiedOn": "2020-01-03T07:41:03.017Z",
            "sortId": 1578037263017,
            "botName": "BankingBot",
            "refId": "re-xxxxx-xxx-xxx-xxx-xxxxx",
            "__v": 0
        }]
}