Skip to main content
GET
/
v1
/
simulation
/
plan
/
job
/
{jobId}
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.simulationRunPlanJob.getByID('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');

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_by_id(
    "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
)
print(response.data)
curl --request GET \
  --url https://api.roark.ai/v1/simulation/plan/job/{jobId} \
  --header 'Authorization: Bearer <token>'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.roark.ai/v1/simulation/plan/job/{jobId}",
  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}"

	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}")
  .header("Authorization", "Bearer <token>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.roark.ai/v1/simulation/plan/job/{jobId}")

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": {
    "simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
    "simulationRunPlanId": "9a8b7c6d-5e4f-3210-abcd-ef9876543210",
    "status": "RUNNING_SIMULATIONS",
    "createdAt": "2024-01-15T10:30:00Z",
    "startedAt": "2024-01-15T10:30:15Z",
    "endedAt": null,
    "simulationJobs": [
      {
        "simulationJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "status": "COMPLETED",
        "processingStatus": "COMPLETED",
        "callId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
        "roarkPhoneNumber": "+15551234567",
        "persona": {
          "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
          "name": "Sarah Johnson - Anxious Patient",
          "language": "EN",
          "secondaryLanguage": null,
          "accent": "US",
          "gender": "FEMALE",
          "backgroundNoise": "OFFICE",
          "speechPace": "NORMAL",
          "speechClarity": "CLEAR",
          "hasDisfluencies": false,
          "baseEmotion": "FRUSTRATED",
          "intentClarity": "CLEAR",
          "confirmationStyle": "EXPLICIT",
          "memoryReliability": "HIGH",
          "backstoryPrompt": "A busy professional calling during lunch break",
          "idleMessages": null,
          "properties": {
            "age": 35,
            "zipCode": "94105"
          },
          "createdAt": "2025-01-10T12:00:00.000Z",
          "updatedAt": "2025-01-10T12:00:00.000Z"
        },
        "scenario": {
          "id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
          "description": "Patient calling to schedule an urgent dental appointment"
        },
        "agentEndpoint": {
          "id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
          "name": "PHONE",
          "phoneNumber": "+15555551234",
          "type": "PHONE"
        },
        "createdAt": "2024-01-15T10:30:20Z",
        "startedAt": "2024-01-15T10:30:25Z",
        "completedAt": "2024-01-15T10:32:45Z"
      }
    ]
  }
}
{
  "type": "authentication",
  "code": "unauthorized",
  "message": "Authentication required"
}
{
  "type": "forbidden",
  "code": "permission_denied",
  "message": "You do not have permission to access this resource"
}
{
  "type": "rate_limit",
  "code": "too_many_requests",
  "message": "Rate limit exceeded"
}
{
  "type": "internal",
  "code": "internal_error",
  "message": "Internal server error"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

Response

Successfully retrieved simulation plan job

data
object
required

Simulation run plan job with all associated simulation jobs

Example:
{
  "simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
  "simulationRunPlanId": "9a8b7c6d-5e4f-3210-abcd-ef9876543210",
  "status": "RUNNING_SIMULATIONS",
  "createdAt": "2024-01-15T10:30:00Z",
  "startedAt": "2024-01-15T10:30:15Z",
  "endedAt": null,
  "simulationJobs": [
    {
      "simulationJobId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "status": "COMPLETED",
      "processingStatus": "COMPLETED",
      "callId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "roarkPhoneNumber": "+15551234567",
      "persona": {
        "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "name": "Sarah Johnson - Anxious Patient",
        "language": "EN",
        "secondaryLanguage": null,
        "accent": "US",
        "gender": "FEMALE",
        "backgroundNoise": "OFFICE",
        "speechPace": "NORMAL",
        "speechClarity": "CLEAR",
        "hasDisfluencies": false,
        "baseEmotion": "FRUSTRATED",
        "intentClarity": "CLEAR",
        "confirmationStyle": "EXPLICIT",
        "memoryReliability": "HIGH",
        "backstoryPrompt": "A busy professional calling during lunch break",
        "idleMessages": null,
        "properties": { "age": 35, "zipCode": "94105" },
        "createdAt": "2025-01-10T12:00:00.000Z",
        "updatedAt": "2025-01-10T12:00:00.000Z"
      },
      "scenario": {
        "id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
        "description": "Patient calling to schedule an urgent dental appointment"
      },
      "agentEndpoint": {
        "id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
        "name": "PHONE",
        "phoneNumber": "+15555551234",
        "type": "PHONE"
      },
      "createdAt": "2024-01-15T10:30:20Z",
      "startedAt": "2024-01-15T10:30:25Z",
      "completedAt": "2024-01-15T10:32:45Z"
    }
  ]
}