{"id":24625,"date":"2020-09-28T08:04:05","date_gmt":"2020-09-28T07:04:05","guid":{"rendered":"https:\/\/developer.kore.ai\/v8-0\/?p=24625"},"modified":"2021-03-25T15:37:35","modified_gmt":"2021-03-25T15:37:35","slug":"add-questions-from-extract-kg","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v8-0\/docs\/bots\/api-guide\/add-questions-from-extract-kg\/","title":{"rendered":"Add Questions from Extract &#8211; KG"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p> To add specific questions to Knowledge graph.<\/p>\n<p class=\"note\">To use this API, app needs the Admin API Scope of <em>KnowlegdeGraph<\/em>.<\/p>\n<p><b>POST<\/b> <code>https:\/\/{{host}}\/api\/public\/stream\/{{streamId}}\/faqs\/bulk?language=en<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h3>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Required\/Optional<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<\/tr>\n<tr>\n<td>host<\/td>\n<td>Required<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td>streamId<\/td>\n<td>Required<\/td>\n<td>Bot ID or Stream ID. You can access it from the General Settings page of the bot.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Query_Parameters\">Query Parameters<\/span><\/h3>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Required\/Optional<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<\/tr>\n<tr>\n<td>language<\/td>\n<td>Required<\/td>\n<td>The bot language, for example, \u201cen\u201d for English and \u201cde\u201d for German.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h3>\n<table>\n<tbody>\n<tr>\n<th><b>Parameter<\/b><\/th>\n<th><b>Required\/Optional<\/b><\/th>\n<th><b>Description<\/b><\/th>\n<\/tr>\n<tr>\n<td>faqs<\/td>\n<td>Optional<\/td>\n<td>Array with the following items:<\/p>\n<ul>\n<li>questionPayload\n<ul>\n<li>question<\/li>\n<\/ul>\n<\/li>\n<li>answerPayload\n<ul>\n<li>text<\/li>\n<li>type<\/li>\n<li>channel<\/li>\n<\/ul>\n<\/li>\n<li>knowledgeTaskId<\/li>\n<li>subQuestions<\/li>\n<li>responseType<\/li>\n<li>subAnswers<\/li>\n<li>streamId<\/li>\n<li>parent<\/li>\n<li>leafterm<\/li>\n<li>qsId<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Authorization\">Authorization<\/span><\/h3>\n<p>Invoke the API with JWT in the header with the following syntax:<\/p>\n<p><code>auth: {{JWT}}<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Response_Content_Type\">Response Content Type<\/span><\/h3>\n<p><code>application\/json<\/code><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h3>\n<pre>curl -X POST \\\r\n  https:\/\/{{host}}\/api\/public\/stream\/{{streamId}}\/faqs\/bulk?language=en \\\r\n  -H 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \\\r\n  -H 'content-type: application\/json' \\\r\n  -d '{\r\n    \"faqs\": [\t\r\n     {\r\n      \"questionPayload\": {\r\n         \"question\": \"You will receive an SMS alert on your registered mobile number once the registration is done.\"     \r\n        },\r\n      \"answerPayload\": [{\r\n            \"text\": \"Will I get a confirmation of my registration?\",\r\n            \"type\": \"basic\",\r\n            \"channel\": \"default\"\r\n         }],\r\n        \"knowledgeTaskId\": \"5afa79639466e4369e3c809f\",\r\n        \"subQuestions\": [],\r\n        \"responseType\": \"message\",\r\n        \"subAnswers\": [],\r\n        \"streamId\": \"st-0af60d2d-dab9-59a3-9380-b1923644b5e5\",\r\n        \"parent\": \"be36bc3a-3055-417c-9d2d-0ab321fead9d\",\r\n        \"leafterm\": \"tarak\",\r\n        \"qsId\": \"qna-d2eff43d-e942-5d70-9218-ffdc840f9c41\"\r\n    }\r\n    ]\r\n}'<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h3><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h3>\n<pre>{ \r\n      \u201cstatus\u201d: \u201csuccess\u201d} \r\n<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To add specific questions to Knowledge graph. To use this API, app needs the Admin API Scope of KnowlegdeGraph. POST https:\/\/{{host}}\/api\/public\/stream\/{{streamId}}\/faqs\/bulk?language=en Path Parameters Parameter Required\/Optional Description host Required Environment URL, for example, https:\/\/bots.kore.ai streamId Required Bot ID or Stream ID. You can access it from the General Settings page of the bot. Query Parameters Parameter...","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-24625","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/comments?post=24625"}],"version-history":[{"count":1,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24625\/revisions"}],"predecessor-version":[{"id":24626,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/posts\/24625\/revisions\/24626"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/media?parent=24625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/categories?post=24625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v8-0\/wp-json\/wp\/v2\/tags?post=24625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}