curl --request POST \
--url https://api.starleads.co/AgentTestExecution \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"testIds": [
"<string>"
],
"repetitions": 123
}
'import requests
url = "https://api.starleads.co/AgentTestExecution"
payload = {
"agentId": "<string>",
"name": "<string>",
"testIds": ["<string>"],
"repetitions": 123
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>', name: '<string>', testIds: ['<string>'], repetitions: 123})
};
fetch('https://api.starleads.co/AgentTestExecution', 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/AgentTestExecution",
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([
'agentId' => '<string>',
'name' => '<string>',
'testIds' => [
'<string>'
],
'repetitions' => 123
]),
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/AgentTestExecution"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.starleads.co/AgentTestExecution")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTestExecution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": "<string>",
"name": "<string>",
"repetitions": 123,
"testIds": [
"<string>"
],
"status": "Queued",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"counters": {
"total": 123,
"queued": 123,
"running": 123,
"passed": 123,
"failed": 123,
"error": 123,
"cancelled": 123
},
"tests": [
{
"testId": "<string>",
"counters": {
"total": 123,
"queued": 123,
"running": 123,
"passed": 123,
"failed": 123,
"error": 123,
"cancelled": 123
},
"passRate": 123
}
]
}{
"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>"
}Launch tests
Launches tests of one of your agents and returns the execution immediately. Give testIds to launch a selection, or omit it to launch every test of the agent; repetitions (1-5) runs each test several times. Poll the execution until its status is Completed or Cancelled.
curl --request POST \
--url https://api.starleads.co/AgentTestExecution \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"agentId": "<string>",
"name": "<string>",
"testIds": [
"<string>"
],
"repetitions": 123
}
'import requests
url = "https://api.starleads.co/AgentTestExecution"
payload = {
"agentId": "<string>",
"name": "<string>",
"testIds": ["<string>"],
"repetitions": 123
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({agentId: '<string>', name: '<string>', testIds: ['<string>'], repetitions: 123})
};
fetch('https://api.starleads.co/AgentTestExecution', 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/AgentTestExecution",
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([
'agentId' => '<string>',
'name' => '<string>',
'testIds' => [
'<string>'
],
'repetitions' => 123
]),
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/AgentTestExecution"
payload := strings.NewReader("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.starleads.co/AgentTestExecution")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.starleads.co/AgentTestExecution")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agentId\": \"<string>\",\n \"name\": \"<string>\",\n \"testIds\": [\n \"<string>\"\n ],\n \"repetitions\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"agentId": "<string>",
"name": "<string>",
"repetitions": 123,
"testIds": [
"<string>"
],
"status": "Queued",
"createdAt": "2023-11-07T05:31:56Z",
"startedAt": "2023-11-07T05:31:56Z",
"finishedAt": "2023-11-07T05:31:56Z",
"cancelledAt": "2023-11-07T05:31:56Z",
"counters": {
"total": 123,
"queued": 123,
"running": 123,
"passed": 123,
"failed": 123,
"error": 123,
"cancelled": 123
},
"tests": [
{
"testId": "<string>",
"counters": {
"total": 123,
"queued": 123,
"running": 123,
"passed": 123,
"failed": 123,
"error": 123,
"cancelled": 123
},
"passRate": 123
}
]
}{
"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.
Body
Tests to launch. Omit testIds (or leave it empty) to launch every test of the agent.
Agent owning the tests
1Free text naming the launch; defaults to "{n} tests"
Tests of the agent to launch; absent or empty launches every test of the agent
Runs created per test, between 1 and 5; null means 1
Response
Success
One launch: the group of runs created together for a list of tests, each repeated repetitions times. Status, counters, tests, startedAt and finishedAt are derived from the runs.
Free text given at launch ("all tests", "folder X", ...); defaults to "{n} tests"
Runs created per test (1-5)
Distinct tests launched, in launch order
Queued, Running, Completed, Cancelled First run dispatched
Last run finished, set once every run is terminal
Set when the execution was cancelled
Runs per status; total is the sum of the others
Show child attributes
Show child attributes
Per test, in testIds order: runs per status and pass rate over the repetitions
Show child attributes
Show child attributes

