{"id":26899,"date":"2021-02-19T09:33:57","date_gmt":"2021-02-19T09:33:57","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=26899"},"modified":"2023-07-19T14:01:46","modified_gmt":"2023-07-19T13:01:46","slug":"batch-test-execution-status-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/batch-test-execution-status-api\/","title":{"rendered":"Batch Test Execution Status API"},"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\"><div class=\"ult-spacer spacer-6ae870772c07a\" data-id=\"6ae870772c07a\" data-height=\"10\" data-height-mobile=\"10\" data-height-tab=\"10\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p><span style=\"font-weight: 400;\">To get the status of the Batch Test Execution request against a unique \u2018Request Id\u2019 and provide the download link for the results file after the test execution is complete. Please refer to the <a href=\"\/docs\/bots\/api-guide\/batch-test-execution-api\/\" target=\"_blank\" rel=\"noopener noreferrer\">Batch Test Execution API<\/a> to learn more.<\/span><\/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}\/testsuite\/{testSuiteName}\/{testRunId}\/status<\/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>\n<p><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\" rel=\"noopener noreferrer\" target=\"_blank\">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: Batch Tests Execution<\/li>\n<li>Admin Console: Not Applicable<\/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=\"ult-spacer spacer-6ae870772c25b\" data-id=\"6ae870772c25b\" data-height=\"20\" data-height-mobile=\"20\" data-height-tab=\"20\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Query_Parameters\">Query Parameters<\/span><\/h2>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<th>Mandate<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400;\"><b>host<\/b><\/span><\/td>\n<td><span style=\"font-weight: 400;\">Environment URL, for example,<code>https:\/\/bots.kore.ai<\/code><\/span><\/td>\n<td>Required<\/tr>\n<tr>\n<td><b>BotID<\/b><\/td>\n<td><span style=\"font-weight: 400;\">The <i>Bot ID<\/i> or <i>Stream ID<\/i> can be accessed under <b>General Settings<\/b> on the Bot Builder.<\/span><\/td>\n<td>Required<\/td>\n<\/tr>\n<tr>\n<td><b>testSuiteName<\/b><\/td>\n<td><span style=\"font-weight: 400;\">Name of the test suite as created in the Bot\u2019s platform that is being executed<\/span><\/td>\n<td>Required<\/tr>\n<tr>\n<td><b>testRunId<\/b><\/td>\n<td><span style=\"font-weight: 400;\">The unique \u2018Request ID\u2019 returned by the Batch Test Execution API to track the progress <\/span><\/td>\n<td>Required<\/tr>\n<\/tbody>\n<\/table>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae870772c410\" data-id=\"6ae870772c410\" data-height=\"20\" data-height-mobile=\"20\" data-height-tab=\"20\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre>curl --location --request GET \\\r\n  'https:\/\/{host}\/api\/public\/stream\/{streamId}\/testsuite\/{testSuiteName}\/{testRunId}\/status' \\\r\n    --header 'auth: {jwt-token}' \\\r\n    --header 'bot-language: {language-code}'\r\n<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae870772c496\" data-id=\"6ae870772c496\" data-height=\"20\" data-height-mobile=\"20\" data-height-tab=\"20\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Body_Parameters\">Body Parameters<\/span><\/h2>\n<p>No body parameters are passed.<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"ult-spacer spacer-6ae870772c50e\" data-id=\"6ae870772c50e\" data-height=\"20\" data-height-mobile=\"20\" data-height-tab=\"20\" data-height-tab-portrait=\"\" data-height-mobile-landscape=\"\" style=\"clear:both;display:block;\"><\/div>\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<ul>\n<li>When the test execution is completed\n<pre class=\"code-limit-500px\">{\r\n    \"_id\": \"tr-74d94321-35f8-5066-bdc8-a0863e7axxxx\",\r\n    \"streamId\": \"st-83a4989c-7f57-59e7-85b8-d6547a91xxxx\",\r\n    \"testSuiteId\": \"ts-cf304560-7e39-5876-ad22-8c114743xxxx\",\r\n    \"status\": \"completed\",\r\n    \"utterance_count\": 1,\r\n    \"result\": {\r\n        \"_id\": \"tr-74d94321-35f8-5066-bdc8-a0863e7axxxx\",\r\n        \"isPartialFailure\": false,\r\n        \"status\": \"completed\",\r\n        \"isAvailable\": true,\r\n        \"testSuiteId\": \"ts-cf304560-7e39-5876-ad22-8c114743893d\",\r\n        \"triggeredBy\": \"u-b6cd832d-d3c0-501f-9d94-9e4c76667e9e\",\r\n        \"streamId\": \"st-83a4989c-7f57-59e7-85b8-d6547a91xxxx\",\r\n        \"botLanguage\": \"en\",\r\n        \"runType\": \"inDevelopment\",\r\n        \"utterance_count\": 1,\r\n        \"startTime\": \"2023-06-26T12:07:38.405Z\",\r\n        \"__v\": 0,\r\n        \"endTime\": \"2023-06-26T12:09:39.518Z\",\r\n        \"f1_score\": \"0.00\",\r\n        \"fileId\": \"649980035ebd2d3b2d5c6df5\",\r\n        \"precision\": \"0.00\",\r\n        \"recall\": \"0.00\",\r\n        \"results\": {\r\n            \"TP\": 0,\r\n            \"TN\": 0,\r\n            \"FP\": 0,\r\n            \"FN\": 0,\r\n            \"success\": 0,\r\n            \"failure\": 1,\r\n            \"traitSuccess\": 0,\r\n            \"traitFailure\": 0,\r\n            \"totalEntitiesCount\": 0,\r\n            \"matchedEntitiesCount\": 0,\r\n            \"totalTraitsCount\": 0,\r\n            \"matchedTraitsCount\": 0,\r\n            \"failedUtteranceCount\": 1,\r\n            \"failedEntitiesCount\": 0\r\n        },\r\n        \"fileUrl\": \"http:\/\/hostname\/api\/getMediaStream\/media\/f-c6071507-a603-59ed-8d2b-5ec344be3696.csv?e=1689769306&n=2501205681&s=IkxtTVdUdTd4c3J6WTFaSWp0MUZHWHlaNjR5bEdmaEJPczNrdU42RHB6TWc9Ig$$&clientfilename=test1-26-06-23.csv&batchtesting=true\"\r\n    }\r\n}\r\n<\/pre>\n<\/li>\n<li>When the test execution is in progress\n<pre class=\"code-limit-500px\">{\r\n    \"_id\": \"tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa\",\r\n    \"streamId\": \"st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb\",\r\n    \"testSuiteId\": \"ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx\",\r\n    \"status\": \"running\",\r\n    \"utterance_count\": 10,\r\n    \"result\": {\r\n        \"_id\": \"tr-beaadxxb-xxxx-xxxe-axfb-xxxxcxbexdxa\",\r\n        \"isPartialFailure\": false,\r\n        \"status\": \"running\",\r\n        \"testSuiteId\": \"ts-deaxxxxc-xxxx-xxxe-axbx-bxxcxxxxfxxx\",\r\n        \"triggeredBy\": \"u-xxbdxecd-xxdx-xxex-xxxd-xxdxxxxdxxea\",\r\n        \"streamId\": \"st-xxxxxxxx-cxxd-xcaf-xxax-dxxxxxxffxdxb\",\r\n        \"botLanguage\": \"en\",\r\n        \"runType\": \"inDevelopment\",\r\n        \"utterance_count\": 10,\r\n        \"startTime\": \"2021-01-07T17:05:34.509Z\",\r\n        \"__v\": 0\r\n    },\r\n    \"totalUtterances\": 10,\r\n    \"utterance_ran\": 5,\r\n    \"percentage\": 50\r\n}\r\n<\/pre>\n<\/li>\n<\/ul>\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 get the status of the Batch Test Execution request against a unique \u2018Request Id\u2019 and provide the download link for the results file after the test execution is complete. Please refer to the Batch Test Execution API to learn more. Method GET Endpoint https:\/\/{host}\/api\/public\/bot\/{botId}\/testsuite\/{testSuiteName}\/{testRunId}\/status Content Type application\/json Authorization auth: {{JWT}} See How to generate...","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-26899","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\/26899","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=26899"}],"version-history":[{"count":7,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/26899\/revisions"}],"predecessor-version":[{"id":57983,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/26899\/revisions\/57983"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=26899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=26899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=26899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}