Platform Endpoints
Get Results
Retrieve results for a completed test run
GET
/
api
/
platform
/
results
/
{runId}
Get Results
curl --request GET \
--url https://api.example.com/api/platform/results/{runId}import requests
url = "https://api.example.com/api/platform/results/{runId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/platform/results/{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.example.com/api/platform/results/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/platform/results/{runId}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/platform/results/{runId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/platform/results/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "<string>",
"passed": true,
"score": {},
"failures": [
{}
],
"diff": {},
"execution_time": 123
}Request
GET /api/platform/results/{runId}
Path Parameters
Run ID from
startRunExample Request
curl -X GET https://api.agentdiff.dev/api/platform/results/run-xyz789 \
-H "X-API-Key: ad_live_sk_..."
Response
Run identifier
Run status:
"passed", "failed", or "running"Whether all assertions passed
Score breakdown
List of failed assertions
Full diff with inserts, updates, deletes
Time in seconds from startRun to completion
Example Response
{
"runId": "run-xyz789",
"status": "passed",
"passed": true,
"score": {
"passed": 2,
"total": 2,
"percent": 100.0
},
"failures": [],
"diff": {
"inserts": [
{
"__table__": "messages",
"message_id": "1732645891.000200",
"message_text": "Hello World!"
}
],
"updates": [],
"deletes": []
},
"execution_time": 2.45
}
Use Cases
- Polling: Check if a run is complete
- Debugging: Inspect detailed diff after a failed test
- Logging: Store results for analysis
Errors
| Error | Status | Description |
|---|---|---|
run_not_found | 404 | Run doesn’t exist |
SDK Usage
results = client.get_results_for_run(runId=run.runId)
print(f"Status: {results.status}")
print(f"Passed: {results.passed}")
print(f"Score: {results.score['percent']}%")
print(f"Execution time: {results.execution_time}s")
if results.failures:
print("Failures:")
for f in results.failures:
print(f" - {f}")
const results = await client.getResultsForRun(run.runId);
console.log(`Status: ${results.status}`);
console.log(`Passed: ${results.passed}`);
console.log(`Score: ${results.score.percent}%`);
console.log(`Execution time: ${results.execution_time}s`);
if (results.failures) {
console.log('Failures:');
results.failures.forEach(f => console.log(` - ${f}`));
}
⌘I
Get Results
curl --request GET \
--url https://api.example.com/api/platform/results/{runId}import requests
url = "https://api.example.com/api/platform/results/{runId}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/platform/results/{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.example.com/api/platform/results/{runId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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.example.com/api/platform/results/{runId}"
req, _ := http.NewRequest("GET", url, nil)
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.example.com/api/platform/results/{runId}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/platform/results/{runId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"runId": "<string>",
"status": "<string>",
"passed": true,
"score": {},
"failures": [
{}
],
"diff": {},
"execution_time": 123
}