Skip to content

Extraction from file or URL – KG

To extract the Knowledge Graph from the imported file or URL.

Method POST
Endpoint https://{{host}}/api/public/bot/{{botId}}/qna/import?language=en
Content Type application/json
Authorization auth: {{YOUR_JWT_ACCESS_TOKEN}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Manage Knowledge Graph
  • Admin Console: Manage Knowledge Graph

Path Parameters

PARAMETER REQUIRED DESCRIPTION
host Required The environment URL. For example, https://bots.kore.ai
BotId Required Bot ID or Stream ID can be accessed under General Settings on the Bot Builder.

Query Parameters

PARAMETER REQUIRED DESCRIPTION
language Required 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.

Sample Request (Extraction using URL)

curl --location 'https://bots.kore.ai/api/public/bot/st-2be3c498-d718-5160-853c-0166b82bc41c/qna/import?language=en' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'content-type: application/json' \
--data '{
    "fileUrl":"https://www.icicibank.com/nri-banking/money_transfer/faq/m2i-rewards-program/loyalty-program.page%22, 
    "name":"Test"

 }'

Sample Request (Extraction using File)

curl --location 'https://bots.kore.ai/api/public/bot/st-2be3c498-d718-5160-853c-0166b82bc41c/qna/import?language=en' \
--header 'auth: {{YOUR_JWT_ACCESS_TOKEN}}' \
--header 'content-type: application/json' \
--header 'Cookie: AWSALB=ywKTJVAcCplRMGaJXRvhZ4gUvOCrfYhOjeqvdYirqAyRQyP9WpTDeNwZI1tDwgoP/CiA6G6j2DxXGWIbCEWdjaiq1ehA2Xo/YxwOBDi02Ix9cbcGYum8P1bxBSq1; AWSALBCORS=ywKTJVAcCplRMGaJXRvhZ4gUvOCrfYhOjeqvdYirqAyRQyP9WpTDeNwZI1tDwgoP/CiA6G6j2DxXGWIbCEWdjaiq1ehA2Xo/YxwOBDi02Ix9cbcGYum8P1bxBSq1' \
--data '{
    "fileId":"64c0facd1913a83c147847ca",
    "name": "Test2"
}'

Body Parameters

PARAMETER REQUIRED DESCRIPTION
fileUrl Required The URL pointing to the location of the FAQs to be extracted.
fileId Required The File id pointing to the FAQ file’s location.
name Required The name provided to the FAQ.

Sample Response

{ 
      "_id": <extractionId>, 
      "status": "success"
}