Get unified test run progress
curl --request GET \
--url https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress', 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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress",
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-Maitai-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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Maitai-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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"test_run_id": 501,
"run_status": "RUNNING",
"total": 25,
"done": 8,
"matched": 6,
"mismatched": 1,
"no_expected": 0,
"errored": 1,
"percent": 0.32,
"duration_ms": {
"avg": 420.5,
"p50": 380,
"p90": 720,
"p95": 810
}
}
}Unified Test Runs
Get unified test run progress
Aggregate counts + duration percentiles for a run.
Returns::
{ "test_run_id": int, "run_status": "CREATED" | "PREPARING_INPUTS" | "RUNNING" | ..., "total": int, # every item on the run "done": int, # COMPLETED + FAILED "matched": int, # matched == true after scoring "mismatched": int, # matched == false after scoring "no_expected": int,# matched IS NULL after scoring "errored": int, # status == 'FAILED' "percent": float, # done / total (0.0 when total == 0) "duration_ms": {"avg", "p50", "p90", "p95"} }
Portal polls this to watch a running conductor advance, matches the shape the workflow-family ``/workflow-test-runs/{id}/progress`` endpoint returns so the UI can share progress components.
GET
/
unified-test-runs
/
{test_run_id}
/
progress
Get unified test run progress
curl --request GET \
--url https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress \
--header 'X-Maitai-Api-Key: <api-key>'import requests
url = "https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress"
headers = {"X-Maitai-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Maitai-Api-Key': '<api-key>'}};
fetch('https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress', 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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress",
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-Maitai-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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Maitai-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.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress")
.header("X-Maitai-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trymaitai.ai/api/v1/unified-test-runs/{test_run_id}/progress")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Maitai-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"test_run_id": 501,
"run_status": "RUNNING",
"total": 25,
"done": 8,
"matched": 6,
"mismatched": 1,
"no_expected": 0,
"errored": 1,
"percent": 0.32,
"duration_ms": {
"avg": 420.5,
"p50": 380,
"p90": 720,
"p95": 810
}
}
}Was this page helpful?