Skip to main content
Back to API List To import the test cases from a given Test Suite file.
FieldValue
MethodPOST
Endpointhttps://{host}/api/public/bot/{botId}/testsuite/import
Content Typeapplication/json
Authorizationauth: {{JWT}} See How to generate the JWT Token.
API ScopeApp Builder: Batch Tests Management; Admin Console: Batch Tests Management

Query Parameters

ParameterDescriptionRequired
hostThe environment URL. For example, https://platform.kore.aiRequired
BotIDThe Bot ID or Stream ID that can be accessed under General Settings on the App 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",
         "engine": "dgpt"
        }'
  • If engine = "regression" (or empty) or engine is not provided, it will execute for ML Batch Testing.
  • If engine is set to "dgpt", it will execute for Dialog GPT Batch Testing.

Body Parameters

ParameterDescriptionRequired
fileNameFile containing the Batch Test suite details.Required
fileTypeJSON.
importTypenew or update.
delimiterField delimiter in the file.Required
descriptionTest 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"
}