{"id":24630,"date":"2020-09-28T08:18:43","date_gmt":"2020-09-28T07:18:43","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=24630"},"modified":"2023-11-14T11:13:01","modified_gmt":"2023-11-14T11:13:01","slug":"get-faqs-kg","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/get-faqs-kg\/","title":{"rendered":"Get FAQs &#8211; KG"},"content":{"rendered":"<p>To get a list of questions and nodes under the Knowledge task.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>Method<\/b><\/td>\n<td>GET<\/td>\n<\/tr>\n<tr>\n<td><b>Endpoint<\/b><\/td>\n<td><span style=\"font-weight: 400;\"><code>https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/faqs?ktId=&amp;limit=&amp;offset=&amp;parentId=&amp;withallchild=&amp;type=&amp;language=en<\/code><\/span><\/td>\n<\/tr>\n<tr>\n<td><b>Content Type<\/b><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><b>Authorization<\/b><\/td>\n<td><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" target=\"_blank\" rel=\"noopener noreferrer\">How to generate the JWT Token<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><b>API Scope<\/b><\/td>\n<td>\n<ul>\n<li>Bot Builder: Manage Knowledge Graph<\/li>\n<li>Admin Console: Manage Knowledge Graph<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Mandate<\/b><\/th>\n<\/tr>\n<tr>\n<td><b>host<\/b><\/td>\n<td>The environment URL. For example, <code>https:\/\/bots.kore.ai<\/code><\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><b>BotId<\/b><\/td>\n<td><i>Bot ID<\/i> or <i>Stream ID<\/i> can be accessed under <b>General Settings<\/b> on the Bot Builder.<\/td>\n<td>Required<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Query_Parameters\">Query Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<th><b>Mandate<\/b><\/th>\n<\/tr>\n<tr>\n<td><b>ktId<\/b><\/td>\n<td>The <i>Knowledge task ID<\/i> based on which the FAQs are listed.<\/p>\n<p>You can retrieve the <i>ktId<\/i> from the request of the <i>GetFAQs<\/i> API call. <a href=\"https:\/\/community.kore.ai\/t\/using-getfaqs-api\/1724\/2\" target=\"_blank\" rel=\"noopener noreferrer\">Learn more<\/a>.<\/p>\n<p><b>Note:<\/b> The <i>ktId<\/i> values are different for both in-development and published bots.<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><b>limit<\/b><\/td>\n<td>The number of records to be fetched. The default count and the maximum limit is 50.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><b>offset<\/b><\/td>\n<td>The number of records to be skipped. The default count is set 0.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><b>parentId<\/b><\/td>\n<td>The ID of the nodes in the Knowledge tasks section.<\/p>\n<p>You can retrieve the <i>parentId<\/i> from the response of the <i>GetFAQs<\/i> API call. <a href=\"https:\/\/community.kore.ai\/t\/using-getfaqs-api\/1724\/2\" target=\"_blank\" rel=\"noopener noreferrer\"> Learn more<\/a>.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><b>withallchild<\/b><\/td>\n<td>Whether child nodes need to be included<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><b>type<\/b><\/td>\n<td>Type of FAQs to be fetched.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<tr>\n<td><b>language<\/b><\/td>\n<td>The Bot language which is identified by the language acronym. For example, <em>en<\/em> for English and <em>de<\/em> for German. The user can set the default language of the bot.<\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><b>search<\/b><\/td>\n<td>Used to search the KG using the <i>reference id<\/i> or <i>display name<\/i>.<\/td>\n<td>Optional<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre>curl -X GET \\\r\n  'https:\/\/{{host}}\/api\/public\/bot\/{{bot_id}}\/faqs?ktId=5afxxxxxf&amp;limit=30&amp;offset=0&amp;parentId=xxxxx-xxx-xxx-xxx-xxxxx&amp;withallchild=true&amp;type=all&amp;language=en' \\\r\n  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  -H 'content-type: application\/json'  \r\n<\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h2>\n<p>No body parameters are passed.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<pre class=\"code-limit-400px\">{\r\n    \"faqs\": [\r\n        {\r\n            \"_id\": \"5exxxxxxxxxxxxxxxxxxxxxx\",\r\n            \"subAnswers\": [],\r\n            \"editLocked\": false,\r\n            \"isPublished\": true,\r\n            \"questionPayload\": {\r\n                \"question\": \"What is Bank Internet Banking?\",\r\n                \"tagsPayload\": []\r\n            },\r\n            \"answerPayload\": [\r\n                {\r\n                    \"_id\": \"mt-95xxxxxx-9xxa-5xxe-97xx-56xxxxxxxxxx\",\r\n                    \"channel\": \"default\",\r\n                    \"streamId\": \"st-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n                    \"lModBy\": \"u-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n                    \"lMod\": \"Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)\",\r\n                    \"createdBy\": \"u-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n                    \"createdOn\": \"Fri Jan 03 2020 13:11:03 GMT+0530 (India Standard Time)\",\r\n                    \"text\": \"Bank Internet banking is a convenient way to bank anytime, anywhere even from the comfort of your home using your PC or Tab.\",\r\n                    \"type\": \"basic\"\r\n                }\r\n            ],\r\n            \"knowledgeTaskId\": \"5axxxxxxxxxxxxxxxxxxxxxx\",\r\n            \"subQuestions\": [],\r\n            \"responseType\": \"message\",\r\n            \"referenceId\" :\"12xxx32\",\r\n            \"label\" :\"displayname\",\r\n            \"streamId\": \"st-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n            \"parent\": \"pa-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n            \"leafterm\": \"yes\",\r\n            \"language\": \"en\",\r\n            \"createdBy\": \"u-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n            \"lastModifiedBy\": \"u-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n            \"createdOn\": \"2020-01-03T07:41:03.017Z\",\r\n            \"modifiedOn\": \"2020-01-03T07:41:03.017Z\",\r\n            \"sortId\": 1578037263017,\r\n            \"botName\": \"BankingBot\",\r\n            \"refId\": \"re-xxxxx-xxx-xxx-xxx-xxxxx\",\r\n            \"__v\": 0\r\n        }]\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To get a list of questions and nodes under the Knowledge task. Method GET Endpoint https:\/\/{{host}}\/api\/public\/bot\/{{botId}}\/faqs?ktId=&amp;limit=&amp;offset=&amp;parentId=&amp;withallchild=&amp;type=&amp;language=en Content Type application\/json Authorization auth: {{JWT}} See How to generate the JWT Token. API Scope Bot Builder: Manage Knowledge Graph Admin Console: Manage Knowledge Graph Path Parameters Parameter Description Mandate host The environment URL. For example, https:\/\/bots.kore.ai Required BotId&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-24630","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/24630","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=24630"}],"version-history":[{"count":36,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/24630\/revisions"}],"predecessor-version":[{"id":60094,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/24630\/revisions\/60094"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=24630"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=24630"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=24630"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}