Skip to content

Import Batch Test Suite API

To import the test cases from a given Test Suite file.

Method POST
Endpoint https://{host}/api/public/bot/{botId}/testsuite/import
Content Type application/json
Authorization auth: {{JWT}}

See How to generate the JWT Token.

API Scope
  • Bot Builder: Batch Tests Management
  • Admin Console: Batch Tests Management

Query Parameters

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

Sample Request

curl --location --request POST \
     'https://{host}/api/public/stream/{streamId}/testsuite/import' \
      --header 'auth: {YOUR_JWT_ACCESS_TOKEN}' \
      --header 'bot-language: {language-code}' \
      --header 'Content-Type: application/json' \
      --data-raw '{
         "delimiter": ",",
         "description": "fcgfddfg",
         "fileName": "5ff70b47a664d31999d9202c",
         "fileType": "json",
         "importType": "update",
         "name": "hgf"
        }'

Body Parameters

PARAMETER DESCRIPTION MANDATE
fileName File containing the Batch Test suite details. Required
fileType JSON.
importType new/update
delimiter Field delimiter in the file Required
description Test suite description Required

Sample Response

{
    "_id": "ts-8304802f-6f85-5f67-8964-de04446c1c93",
    "name": "hgf",
    "description": "fcgfddfg",
    "streamId": "st-15864388-c33d-5caf-86a6-d17951ff3d5b",
    "language": "en",
    "fileId": "5ff70b47a664d31999d9202c",
    "createdBy": "u-49bd0ecd-18d1-53e1-988d-84d3004d79ea",
    "createdOn": "2021-01-05T17:43:43.927Z",
    "modifiedOn": "2021-01-07T13:48:14.169Z",
    "__v": 0,
    "fileName": "sampleBatchtesting (2) (copy) (1).json"
}