import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.simulationRunPlanJob.getResults('jobId');
console.log(response.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
response = client.simulation_run_plan_job.get_results(
job_id="jobId",
)
print(response.data)curl --request GET \
--url https://api.roark.ai/v1/simulation/plan/job/{jobId}/results \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/plan/job/{jobId}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.roark.ai/v1/simulation/plan/job/{jobId}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.roark.ai/v1/simulation/plan/job/{jobId}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/plan/job/{jobId}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"run": {
"simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
"simulationRunPlanId": "550e8400-e29b-41d4-a716-446655440000",
"simulationRunPlanName": "Appointment booking regression",
"runNumber": 42,
"status": "COMPLETED",
"triggeredBy": "TRIGGERED_FROM_API",
"createdAt": "2026-10-11T14:00:00.000Z",
"startedAt": "2026-10-11T14:00:03.000Z",
"endedAt": "2026-10-11T14:04:41.000Z",
"durationMs": 278000
},
"summary": {
"totalCalls": 10,
"countedCalls": 10,
"completedCalls": 10,
"evaluatedCalls": 10,
"passedCalls": 7,
"failedCalls": 3,
"callPassRate": 70,
"score": 85,
"checkPassRate": 85
},
"verdict": null,
"attemptSummary": {
"testCaseCount": 10,
"attemptCount": 10,
"silentAttemptCount": 0,
"retryCount": 0,
"stillSilentTestCaseCount": 0
},
"metrics": [
{
"metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"metricId": "booked_appointment_check",
"name": "Booked appointment",
"outputType": "BOOLEAN",
"isCheck": true,
"unitSymbol": null,
"evaluatedCalls": 10,
"sampleSize": 10,
"check": {
"passedCalls": 7,
"failedCalls": 3,
"evaluatedCalls": 10,
"passRate": 70
},
"numeric": null,
"distribution": [
{
"value": "true",
"count": 7
},
{
"value": "false",
"count": 3
}
]
}
],
"calls": [
{
"simulationJobId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"callId": "6e7f8a9b-0c1d-4e2f-9a3b-4c5d6e7f8a9b",
"status": "COMPLETED",
"counted": true,
"attemptNumber": 1,
"retryOfSimulationJobId": null,
"personaName": "Ana",
"agentName": "Front desk",
"durationMs": 94000,
"passed": false,
"checks": [
{
"metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"metricName": "Booked appointment",
"passed": false
}
],
"values": []
}
],
"breakdowns": {
"byAgent": [],
"byPersona": []
},
"comparison": null,
"sweepAttribution": null,
"debrief": null
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Get simulation run results
Everything the run report shows, in one request: the summary and score, the pass/fail verdict,
per-metric aggregates, every simulation with its check results, breakdowns by agent and persona,
the comparison against the previous run (or compareToJobId), the sweep attribution, and the
written debrief with its executive summary, failure themes and recommendations.
Safe to call while the run is in progress: counts reflect what has landed so far. verdict and
sweepAttribution stay null until the run ends. The debrief is generated automatically a few
minutes after a run with graded calls settles; poll until debrief.status is READY, or request
one with POST /v1/simulation/plan/job//debrief.
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: process.env['ROARK_API_BEARER_TOKEN'], // This is the default and can be omitted
});
const response = await client.simulationRunPlanJob.getResults('jobId');
console.log(response.data);import os
from roark_analytics import Roark
client = Roark(
bearer_token=os.environ.get("ROARK_API_BEARER_TOKEN"), # This is the default and can be omitted
)
response = client.simulation_run_plan_job.get_results(
job_id="jobId",
)
print(response.data)curl --request GET \
--url https://api.roark.ai/v1/simulation/plan/job/{jobId}/results \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/plan/job/{jobId}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.roark.ai/v1/simulation/plan/job/{jobId}/results"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.roark.ai/v1/simulation/plan/job/{jobId}/results")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/plan/job/{jobId}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"run": {
"simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
"simulationRunPlanId": "550e8400-e29b-41d4-a716-446655440000",
"simulationRunPlanName": "Appointment booking regression",
"runNumber": 42,
"status": "COMPLETED",
"triggeredBy": "TRIGGERED_FROM_API",
"createdAt": "2026-10-11T14:00:00.000Z",
"startedAt": "2026-10-11T14:00:03.000Z",
"endedAt": "2026-10-11T14:04:41.000Z",
"durationMs": 278000
},
"summary": {
"totalCalls": 10,
"countedCalls": 10,
"completedCalls": 10,
"evaluatedCalls": 10,
"passedCalls": 7,
"failedCalls": 3,
"callPassRate": 70,
"score": 85,
"checkPassRate": 85
},
"verdict": null,
"attemptSummary": {
"testCaseCount": 10,
"attemptCount": 10,
"silentAttemptCount": 0,
"retryCount": 0,
"stillSilentTestCaseCount": 0
},
"metrics": [
{
"metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"metricId": "booked_appointment_check",
"name": "Booked appointment",
"outputType": "BOOLEAN",
"isCheck": true,
"unitSymbol": null,
"evaluatedCalls": 10,
"sampleSize": 10,
"check": {
"passedCalls": 7,
"failedCalls": 3,
"evaluatedCalls": 10,
"passRate": 70
},
"numeric": null,
"distribution": [
{
"value": "true",
"count": 7
},
{
"value": "false",
"count": 3
}
]
}
],
"calls": [
{
"simulationJobId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"callId": "6e7f8a9b-0c1d-4e2f-9a3b-4c5d6e7f8a9b",
"status": "COMPLETED",
"counted": true,
"attemptNumber": 1,
"retryOfSimulationJobId": null,
"personaName": "Ana",
"agentName": "Front desk",
"durationMs": 94000,
"passed": false,
"checks": [
{
"metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
"metricName": "Booked appointment",
"passed": false
}
],
"values": []
}
],
"breakdowns": {
"byAgent": [],
"byPersona": []
},
"comparison": null,
"sweepAttribution": null,
"debrief": null
}
}{
"type": "validation",
"code": "invalid_parameter",
"message": "The request was invalid",
"param": "email"
}{
"type": "authentication",
"code": "unauthorized",
"message": "Authentication required"
}{
"type": "forbidden",
"code": "permission_denied",
"message": "You do not have permission to access this resource"
}{
"type": "not_found",
"code": "resource_not_found",
"message": "The requested resource could not be found"
}{
"type": "rate_limit",
"code": "too_many_requests",
"message": "Rate limit exceeded"
}{
"type": "internal",
"code": "internal_error",
"message": "Internal server error"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Simulation run plan job to compare this run against, e.g. the last run on your main branch. Defaults to the plan's previous settled run. Any run in the project works, including another plan's: checks are matched by metric, and a check only one run graded reads null on the other side.
"9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
Response
The run’s results
Everything the run report shows, in one response.
Show child attributes
Show child attributes
{ "run": { "simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f", "simulationRunPlanId": "550e8400-e29b-41d4-a716-446655440000", "simulationRunPlanName": "Appointment booking regression", "runNumber": 42, "status": "COMPLETED", "triggeredBy": "TRIGGERED_FROM_API", "createdAt": "2026-10-11T14:00:00.000Z", "startedAt": "2026-10-11T14:00:03.000Z", "endedAt": "2026-10-11T14:04:41.000Z", "durationMs": 278000 }, "summary": { "totalCalls": 10, "countedCalls": 10, "completedCalls": 10, "evaluatedCalls": 10, "passedCalls": 7, "failedCalls": 3, "callPassRate": 70, "score": 85, "checkPassRate": 85 }, "verdict": null, "attemptSummary": { "testCaseCount": 10, "attemptCount": 10, "silentAttemptCount": 0, "retryCount": 0, "stillSilentTestCaseCount": 0 }, "metrics": [ { "metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb", "metricId": "booked_appointment_check", "name": "Booked appointment", "outputType": "BOOLEAN", "isCheck": true, "unitSymbol": null, "evaluatedCalls": 10, "sampleSize": 10, "check": { "passedCalls": 7, "failedCalls": 3, "evaluatedCalls": 10, "passRate": 70 }, "numeric": null, "distribution": [ { "value": "true", "count": 7 }, { "value": "false", "count": 3 } ] } ], "calls": [ { "simulationJobId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d", "callId": "6e7f8a9b-0c1d-4e2f-9a3b-4c5d6e7f8a9b", "status": "COMPLETED", "counted": true, "attemptNumber": 1, "retryOfSimulationJobId": null, "personaName": "Ana", "agentName": "Front desk", "durationMs": 94000, "passed": false, "checks": [ { "metricDefinitionId": "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb", "metricName": "Booked appointment", "passed": false } ], "values": [] } ], "breakdowns": { "byAgent": [], "byPersona": [] }, "comparison": null, "sweepAttribution": null, "debrief": null }