curl --request PUT \
--url https://api.starleads.co/AgentTest/classification/{testId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}
'import requests
url = "https://api.starleads.co/AgentTest/classification/{testId}"
payload = {
"name": "<string>",
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
conversationContext: {
messages: [{role: '<string>', text: '<string>', timestamp: '2023-11-07T05:31:56Z'}],
dataBag: {}
},
tagExpected: '<string>'
})
};
fetch('https://api.starleads.co/AgentTest/classification/{testId}', 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://api.starleads.co/AgentTest/classification/{testId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'conversationContext' => [
'messages' => [
[
'role' => '<string>',
'text' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'dataBag' => [
]
],
'tagExpected' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-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://api.starleads.co/AgentTest/classification/{testId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.put("https://api.starleads.co/AgentTest/classification/{testId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTest/classification/{testId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "Simulation",
"agentId": "<string>",
"folderId": "<string>",
"name": "<string>",
"lastRunId": "<string>",
"lastRunStatus": "Queued",
"lastRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scenario": "<string>",
"criteria": [
"<string>"
],
"maxTurns": 123,
"conversationMessages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"variables": {},
"toolMocking": {
"mockedTools": [
{
"toolId": "<string>",
"resultTemplate": "<string>",
"delaySeconds": 30
}
],
"mockAllTools": true,
"mockCallTransfer": true
},
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Update a classification test
Updates the provided fields of a classification test.
curl --request PUT \
--url https://api.starleads.co/AgentTest/classification/{testId} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "<string>",
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}
'import requests
url = "https://api.starleads.co/AgentTest/classification/{testId}"
payload = {
"name": "<string>",
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
conversationContext: {
messages: [{role: '<string>', text: '<string>', timestamp: '2023-11-07T05:31:56Z'}],
dataBag: {}
},
tagExpected: '<string>'
})
};
fetch('https://api.starleads.co/AgentTest/classification/{testId}', 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://api.starleads.co/AgentTest/classification/{testId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'conversationContext' => [
'messages' => [
[
'role' => '<string>',
'text' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z'
]
],
'dataBag' => [
]
],
'tagExpected' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-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://api.starleads.co/AgentTest/classification/{testId}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.put("https://api.starleads.co/AgentTest/classification/{testId}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTest/classification/{testId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"conversationContext\": {\n \"messages\": [\n {\n \"role\": \"<string>\",\n \"text\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\"\n }\n ],\n \"dataBag\": {}\n },\n \"tagExpected\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"kind": "Simulation",
"agentId": "<string>",
"folderId": "<string>",
"name": "<string>",
"lastRunId": "<string>",
"lastRunStatus": "Queued",
"lastRunAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scenario": "<string>",
"criteria": [
"<string>"
],
"maxTurns": 123,
"conversationMessages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"variables": {},
"toolMocking": {
"mockedTools": [
{
"toolId": "<string>",
"resultTemplate": "<string>",
"delaySeconds": 30
}
],
"mockAllTools": true,
"mockCallTransfer": true
},
"conversationContext": {
"messages": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"dataBag": {}
},
"tagExpected": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Authorizations
Headers
Api key to pass as a X-Api-Key request header.
Path Parameters
ID of the test.
Body
Response
Success
A test of an agent. Depending on kind, either the simulation fields (scenario, criteria, maxTurns, variables) or the classification fields (conversationContext, tagExpected) are set.
Simulation, Classification Folder containing the test, null at the root
Most recent run of the test
Queued, Running, Passed, Failed, Error, Cancelled Simulation only: persona and intent of the simulated user
Simulation only: success criteria, each judged independently
Simulation only: maximum number of user/agent exchanges (1-30)
Simulation only: messages the conversation starts from, in chronological order; empty when the run starts from scratch
Show child attributes
Show child attributes
Simulation only: values of the agent variables (name → value)
Show child attributes
Show child attributes
Which tools of the agent are mocked (not really executed) during a simulation. Every mock is opt-in: nothing is mocked unless asked for here, and mockAllTools does not imply mockCallTransfer. The knowledge base retrieval always runs for real.
Show child attributes
Show child attributes
Conversation used as input of a classification test
Show child attributes
Show child attributes
Classification only: expected tag

