JavaScript
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.simulationRunGroup.regenerateReport(
'5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
);
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_group.regenerate_report(
"5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
)
print(response.data)curl --request POST \
--url https://api.roark.ai/v1/simulation/run-group/{groupId}/report \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/run-group/{groupId}/report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/run-group/{groupId}/report"
req, _ := http.NewRequest("POST", 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.post("https://api.roark.ai/v1/simulation/run-group/{groupId}/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/run-group/{groupId}/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"errorMessage": "<string>",
"createdAt": "<string>",
"completedAt": "<string>",
"document": {
"version": 1,
"generatedAtIso": "<string>",
"model": "<string>",
"simulationRunGroupId": "<string>",
"headline": {
"groupName": "<string>",
"runCount": 123,
"reportedRunCount": 123,
"passedRunCount": 123,
"callCount": 123,
"verdict": "PASSED",
"completedAtIso": "<string>",
"verdictProse": "<string>",
"statTiles": [
{
"label": "<string>",
"value": "<string>",
"sub": "<string>",
"deltaDirection": "POSITIVE"
}
]
},
"runs": [
{
"simulationRunPlanJobId": "<string>",
"runLabel": "<string>",
"runNumber": 123,
"status": "PENDING",
"verdict": "PASSED",
"callCount": 123,
"checksPassed": 123,
"checksTotal": 123,
"themeCount": 123,
"completedAtIso": "<string>",
"summary": "<string>"
}
],
"executiveSummary": [
{
"heading": "<string>",
"body": "<string>"
}
],
"scorecard": [
{
"checkName": "<string>",
"runCount": 123,
"failedRunCount": 123,
"failedCount": 123,
"evaluatedCount": 123,
"passRatePct": 123
}
],
"wentWell": [
{
"title": "<string>",
"body": "<string>",
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"issues": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"severity": "HIGH",
"rootCauseChannel": "PROMPT",
"affectedCallCount": 123,
"runLabels": [
"<string>"
],
"checkNames": [
"<string>"
],
"sourceThemes": [
{
"simulationRunPlanJobId": "<string>",
"slug": "<string>"
}
],
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
],
"calls": [
{
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"smallerItems": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"severity": "HIGH",
"rootCauseChannel": "PROMPT",
"affectedCallCount": 123,
"runLabels": [
"<string>"
],
"checkNames": [
"<string>"
],
"sourceThemes": [
{
"simulationRunPlanJobId": "<string>",
"slug": "<string>"
}
],
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
],
"calls": [
{
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"recommendations": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"channel": "PROMPT",
"issueOrders": [
123
]
}
],
"aggregates": [
{
"metricName": "<string>",
"averageLabel": "<string>",
"medianLabel": "<string>",
"p95Label": "<string>",
"evaluatedCount": 123
}
],
"methodology": "<string>"
}
}
}{
"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"
}Simulation
Regenerate a run group report
Generates the group report again over the latest state of its runs. Returns the report generation; if one is already in flight it is returned instead of starting another. Poll GET /v1/simulation/run-group/ until latestReport.status is READY.
POST
/
v1
/
simulation
/
run-group
/
{groupId}
/
report
JavaScript
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.simulationRunGroup.regenerateReport(
'5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e',
);
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_group.regenerate_report(
"5b6c7d8e-9f0a-4b1c-8d2e-3f4a5b6c7d8e",
)
print(response.data)curl --request POST \
--url https://api.roark.ai/v1/simulation/run-group/{groupId}/report \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.roark.ai/v1/simulation/run-group/{groupId}/report",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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/run-group/{groupId}/report"
req, _ := http.NewRequest("POST", 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.post("https://api.roark.ai/v1/simulation/run-group/{groupId}/report")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.roark.ai/v1/simulation/run-group/{groupId}/report")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "PENDING",
"errorMessage": "<string>",
"createdAt": "<string>",
"completedAt": "<string>",
"document": {
"version": 1,
"generatedAtIso": "<string>",
"model": "<string>",
"simulationRunGroupId": "<string>",
"headline": {
"groupName": "<string>",
"runCount": 123,
"reportedRunCount": 123,
"passedRunCount": 123,
"callCount": 123,
"verdict": "PASSED",
"completedAtIso": "<string>",
"verdictProse": "<string>",
"statTiles": [
{
"label": "<string>",
"value": "<string>",
"sub": "<string>",
"deltaDirection": "POSITIVE"
}
]
},
"runs": [
{
"simulationRunPlanJobId": "<string>",
"runLabel": "<string>",
"runNumber": 123,
"status": "PENDING",
"verdict": "PASSED",
"callCount": 123,
"checksPassed": 123,
"checksTotal": 123,
"themeCount": 123,
"completedAtIso": "<string>",
"summary": "<string>"
}
],
"executiveSummary": [
{
"heading": "<string>",
"body": "<string>"
}
],
"scorecard": [
{
"checkName": "<string>",
"runCount": 123,
"failedRunCount": 123,
"failedCount": 123,
"evaluatedCount": 123,
"passRatePct": 123
}
],
"wentWell": [
{
"title": "<string>",
"body": "<string>",
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"issues": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"severity": "HIGH",
"rootCauseChannel": "PROMPT",
"affectedCallCount": 123,
"runLabels": [
"<string>"
],
"checkNames": [
"<string>"
],
"sourceThemes": [
{
"simulationRunPlanJobId": "<string>",
"slug": "<string>"
}
],
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
],
"calls": [
{
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"smallerItems": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"severity": "HIGH",
"rootCauseChannel": "PROMPT",
"affectedCallCount": 123,
"runLabels": [
"<string>"
],
"checkNames": [
"<string>"
],
"sourceThemes": [
{
"simulationRunPlanJobId": "<string>",
"slug": "<string>"
}
],
"evidence": [
{
"text": "<string>",
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
],
"calls": [
{
"simulationRunPlanJobId": "<string>",
"conversationId": "<string>",
"callId": "<string>",
"personaName": "<string>",
"cueMs": 123
}
]
}
],
"recommendations": [
{
"order": 123,
"title": "<string>",
"body": "<string>",
"channel": "PROMPT",
"issueOrders": [
123
]
}
],
"aggregates": [
{
"metricName": "<string>",
"averageLabel": "<string>",
"medianLabel": "<string>",
"p95Label": "<string>",
"evaluatedCount": 123
}
],
"methodology": "<string>"
}
}
}{
"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
The run group ID
Response
The report generation, in flight
One generation of the group report.
Show child attributes
Show child attributes