Find a simulation job directly by its ID
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: 'My Bearer Token',
});
const response = await client.simulation.getJobById('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');
console.log(response.data);
{
"data": {
"simulationJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
"status": "COMPLETED",
"processingStatus": "PROCESSED",
"persona": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sarah Johnson - Anxious Patient",
"language": "EN",
"accent": "US_SOUTHERN",
"gender": "FEMALE",
"backgroundNoise": "OFFICE",
"speechPace": "NORMAL",
"speechClarity": "CLEAR",
"disfluencies": false,
"baseEmotion": "ANXIOUS",
"intentClarity": "MODERATE",
"confirmationStyle": "DETAILED",
"memoryReliability": "HIGH"
},
"scenario": {
"id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
"description": "Patient calling to schedule an urgent dental appointment due to severe tooth pain"
},
"agentEndpoint": {
"id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
"name": "PHONE",
"phoneNumber": "+15555551234",
"endpointType": "PHONE"
},
"createdAt": "2025-01-15T14:23:45.123Z",
"startedAt": "2025-01-15T14:24:15.456Z",
"completedAt": "2025-01-15T14:28:32.789Z"
}
}
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Simulation job ID
Successfully found simulation job
The response is of type object
.
import Roark from '@roarkanalytics/sdk';
const client = new Roark({
bearerToken: 'My Bearer Token',
});
const response = await client.simulation.getJobById('7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f');
console.log(response.data);
{
"data": {
"simulationJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
"status": "COMPLETED",
"processingStatus": "PROCESSED",
"persona": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Sarah Johnson - Anxious Patient",
"language": "EN",
"accent": "US_SOUTHERN",
"gender": "FEMALE",
"backgroundNoise": "OFFICE",
"speechPace": "NORMAL",
"speechClarity": "CLEAR",
"disfluencies": false,
"baseEmotion": "ANXIOUS",
"intentClarity": "MODERATE",
"confirmationStyle": "DETAILED",
"memoryReliability": "HIGH"
},
"scenario": {
"id": "f8e7d6c5-b4a3-9281-7069-5f4e3d2c1b0a",
"description": "Patient calling to schedule an urgent dental appointment due to severe tooth pain"
},
"agentEndpoint": {
"id": "3c2b1a09-8f7e-6d5c-4b3a-291807060504",
"name": "PHONE",
"phoneNumber": "+15555551234",
"endpointType": "PHONE"
},
"createdAt": "2025-01-15T14:23:45.123Z",
"startedAt": "2025-01-15T14:24:15.456Z",
"completedAt": "2025-01-15T14:28:32.789Z"
}
}