Get a run
curl --request GET \
--url https://api.starleads.co/AgentTestRun/{runId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.starleads.co/AgentTestRun/{runId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.starleads.co/AgentTestRun/{runId}', 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/AgentTestRun/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.starleads.co/AgentTestRun/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.starleads.co/AgentTestRun/{runId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTestRun/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"testId": "<string>",
"agentId": "<string>",
"kind": "Simulation",
"executionId": "<string>",
"attempt": 123,
"status": "Queued",
"errorReason": "<string>",
"errorDetail": "<string>",
"agentChangeId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dispatchedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"simulation": {
"transcript": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"verdicts": [
{
"criterion": "<string>",
"passed": true,
"reason": "<string>",
"score": 123
}
],
"variablesUsed": {},
"turns": 123,
"endReason": "<string>"
},
"classification": {
"tagProduced": "<string>",
"matches": true
}
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Agent Test Runs
Get a run
Returns a run with its status, its execution and attempt number and, once finished, its result: transcript and per-criterion verdicts for a simulation, produced tag for a classification.
GET
/
AgentTestRun
/
{runId}
Get a run
curl --request GET \
--url https://api.starleads.co/AgentTestRun/{runId} \
--header 'X-Api-Key: <api-key>'import requests
url = "https://api.starleads.co/AgentTestRun/{runId}"
headers = {"X-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<api-key>'}};
fetch('https://api.starleads.co/AgentTestRun/{runId}', 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/AgentTestRun/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.starleads.co/AgentTestRun/{runId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.starleads.co/AgentTestRun/{runId}")
.header("X-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTestRun/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"testId": "<string>",
"agentId": "<string>",
"kind": "Simulation",
"executionId": "<string>",
"attempt": 123,
"status": "Queued",
"errorReason": "<string>",
"errorDetail": "<string>",
"agentChangeId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"dispatchedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"simulation": {
"transcript": [
{
"role": "<string>",
"text": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"verdicts": [
{
"criterion": "<string>",
"passed": true,
"reason": "<string>",
"score": 123
}
],
"variablesUsed": {},
"turns": 123,
"endReason": "<string>"
},
"classification": {
"tagProduced": "<string>",
"matches": true
}
}{
"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 run.
Response
Success
One run of a test inside an execution
Available options:
Simulation, Classification Execution (launch) this run was created by
Position of this run among the repetitions of its test in the execution (1..repetitions)
Available options:
Queued, Running, Passed, Failed, Error, Cancelled Human-readable reason when status is Error
Technical detail of the error, for diagnosis
Identifier of the latest change of the agent when the run was launched
Show child attributes
Show child attributes
Show child attributes
Show child attributes

