Agent testing
Run the failed tests of one run again
Starts a new run of the tests that failed, or of the testIds named, at the original run’s repeat count. Tests already running are skipped. It spends the workspace’s credits as the first run did. Returns 409 NOTHING_TO_RESUBMIT when nothing failed and no tests are named, and 404 TEST_NOT_IN_SUITE for a test outside the run. Needs a Full access key.
POST
/
api
/
v2
/
agents
/
{agentId}
/
test-suites
/
{suiteId}
/
resubmit
Run the failed tests of one run again
curl --request POST \
--url https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"testIds": [
"<string>"
],
"allowMessageCredits": false,
"overrides": {
"environment": "<string>",
"agentOverrides": {
"instructions": "<string>",
"guardrails": "<string>",
"greeting": "<string>",
"model": "<string>",
"temperature": 0.5,
"defaultLanguage": "<string>"
},
"voiceOverrides": {
"duplexVoice": "<string>",
"model": "<string>",
"temperature": 0.5,
"voiceId": "<string>",
"voiceName": "<string>",
"voiceLanguage": "<string>",
"speed": 1.25,
"stability": 0.5,
"similarity": 0.5
},
"startingWorkflowNodeId": "<string>",
"dynamicVariables": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit"
payload = {
"testIds": ["<string>"],
"allowMessageCredits": False,
"overrides": {
"environment": "<string>",
"agentOverrides": {
"instructions": "<string>",
"guardrails": "<string>",
"greeting": "<string>",
"model": "<string>",
"temperature": 0.5,
"defaultLanguage": "<string>"
},
"voiceOverrides": {
"duplexVoice": "<string>",
"model": "<string>",
"temperature": 0.5,
"voiceId": "<string>",
"voiceName": "<string>",
"voiceLanguage": "<string>",
"speed": 1.25,
"stability": 0.5,
"similarity": 0.5
},
"startingWorkflowNodeId": "<string>",
"dynamicVariables": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
testIds: ['<string>'],
allowMessageCredits: false,
overrides: {
environment: '<string>',
agentOverrides: {
instructions: '<string>',
guardrails: '<string>',
greeting: '<string>',
model: '<string>',
temperature: 0.5,
defaultLanguage: '<string>'
},
voiceOverrides: {
duplexVoice: '<string>',
model: '<string>',
temperature: 0.5,
voiceId: '<string>',
voiceName: '<string>',
voiceLanguage: '<string>',
speed: 1.25,
stability: 0.5,
similarity: 0.5
},
startingWorkflowNodeId: '<string>',
dynamicVariables: [{name: '<string>', value: '<string>'}]
}
})
};
fetch('https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'testIds' => [
'<string>'
],
'allowMessageCredits' => false,
'overrides' => [
'environment' => '<string>',
'agentOverrides' => [
'instructions' => '<string>',
'guardrails' => '<string>',
'greeting' => '<string>',
'model' => '<string>',
'temperature' => 0.5,
'defaultLanguage' => '<string>'
],
'voiceOverrides' => [
'duplexVoice' => '<string>',
'model' => '<string>',
'temperature' => 0.5,
'voiceId' => '<string>',
'voiceName' => '<string>',
'voiceLanguage' => '<string>',
'speed' => 1.25,
'stability' => 0.5,
'similarity' => 0.5
],
'startingWorkflowNodeId' => '<string>',
'dynamicVariables' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit"
payload := strings.NewReader("{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"requiresConfirmation": false,
"batchIds": [
"<string>"
],
"skipped": 1,
"suiteId": "<string>",
"alreadyRunning": [
{
"testId": "<string>",
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"leaseUntil": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}Authorizations
workspaceApiKeyworkspaceApiKeyHeader
Headers
Path Parameters
Body
application/json
⌘I
Run the failed tests of one run again
curl --request POST \
--url https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"testIds": [
"<string>"
],
"allowMessageCredits": false,
"overrides": {
"environment": "<string>",
"agentOverrides": {
"instructions": "<string>",
"guardrails": "<string>",
"greeting": "<string>",
"model": "<string>",
"temperature": 0.5,
"defaultLanguage": "<string>"
},
"voiceOverrides": {
"duplexVoice": "<string>",
"model": "<string>",
"temperature": 0.5,
"voiceId": "<string>",
"voiceName": "<string>",
"voiceLanguage": "<string>",
"speed": 1.25,
"stability": 0.5,
"similarity": 0.5
},
"startingWorkflowNodeId": "<string>",
"dynamicVariables": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
'import requests
url = "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit"
payload = {
"testIds": ["<string>"],
"allowMessageCredits": False,
"overrides": {
"environment": "<string>",
"agentOverrides": {
"instructions": "<string>",
"guardrails": "<string>",
"greeting": "<string>",
"model": "<string>",
"temperature": 0.5,
"defaultLanguage": "<string>"
},
"voiceOverrides": {
"duplexVoice": "<string>",
"model": "<string>",
"temperature": 0.5,
"voiceId": "<string>",
"voiceName": "<string>",
"voiceLanguage": "<string>",
"speed": 1.25,
"stability": 0.5,
"similarity": 0.5
},
"startingWorkflowNodeId": "<string>",
"dynamicVariables": [
{
"name": "<string>",
"value": "<string>"
}
]
}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
testIds: ['<string>'],
allowMessageCredits: false,
overrides: {
environment: '<string>',
agentOverrides: {
instructions: '<string>',
guardrails: '<string>',
greeting: '<string>',
model: '<string>',
temperature: 0.5,
defaultLanguage: '<string>'
},
voiceOverrides: {
duplexVoice: '<string>',
model: '<string>',
temperature: 0.5,
voiceId: '<string>',
voiceName: '<string>',
voiceLanguage: '<string>',
speed: 1.25,
stability: 0.5,
similarity: 0.5
},
startingWorkflowNodeId: '<string>',
dynamicVariables: [{name: '<string>', value: '<string>'}]
}
})
};
fetch('https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'testIds' => [
'<string>'
],
'allowMessageCredits' => false,
'overrides' => [
'environment' => '<string>',
'agentOverrides' => [
'instructions' => '<string>',
'guardrails' => '<string>',
'greeting' => '<string>',
'model' => '<string>',
'temperature' => 0.5,
'defaultLanguage' => '<string>'
],
'voiceOverrides' => [
'duplexVoice' => '<string>',
'model' => '<string>',
'temperature' => 0.5,
'voiceId' => '<string>',
'voiceName' => '<string>',
'voiceLanguage' => '<string>',
'speed' => 1.25,
'stability' => 0.5,
'similarity' => 0.5
],
'startingWorkflowNodeId' => '<string>',
'dynamicVariables' => [
[
'name' => '<string>',
'value' => '<string>'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit"
payload := strings.NewReader("{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.cntillion.com/api/v2/agents/{agentId}/test-suites/{suiteId}/resubmit")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"testIds\": [\n \"<string>\"\n ],\n \"allowMessageCredits\": false,\n \"overrides\": {\n \"environment\": \"<string>\",\n \"agentOverrides\": {\n \"instructions\": \"<string>\",\n \"guardrails\": \"<string>\",\n \"greeting\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"defaultLanguage\": \"<string>\"\n },\n \"voiceOverrides\": {\n \"duplexVoice\": \"<string>\",\n \"model\": \"<string>\",\n \"temperature\": 0.5,\n \"voiceId\": \"<string>\",\n \"voiceName\": \"<string>\",\n \"voiceLanguage\": \"<string>\",\n \"speed\": 1.25,\n \"stability\": 0.5,\n \"similarity\": 0.5\n },\n \"startingWorkflowNodeId\": \"<string>\",\n \"dynamicVariables\": [\n {\n \"name\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"requiresConfirmation": false,
"batchIds": [
"<string>"
],
"skipped": 1,
"suiteId": "<string>",
"alreadyRunning": [
{
"testId": "<string>",
"name": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"leaseUntil": "2023-11-07T05:31:56Z"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": "<unknown>"
}
}