Create a run plan
Changed onCreates a new simulation run plan.
To run a simulation, use POST /v1/simulation/run instead: it starts a run from a plan or from an inline configuration, and takes runtime variables. Create a plan here when you want a reusable, named one to run later.
Send template instead of a full configuration to save one of the built-in templates as a plan. It takes the same fields as the template variant of POST /v1/simulation/run, builds the same plan, and never starts it.
To compare one property, attach the flow once and send comparisonProperty with the comparisonValues to run: the plan attaches the flow once per value.
Request
- Base URLhttps://api.roark.ai
- URLhttps://api.roark.ai/v1/simulation/plan
- AuthHTTP bearer
Request body
Example request
{
"name": "Background noise sweep",
"direction": "OUTBOUND",
"iterationCount": 5,
"maxSimulationDurationSeconds": 300,
"agentEndpoints": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
],
"metrics": [
{
"slug": "call_outcome"
}
],
"flows": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"happyPath": true
}
],
"comparisonProperty": "BACKGROUND_NOISE",
"comparisonValues": [
"NONE",
"CITY",
"TRAIN"
],
"comparisonBaseline": "NONE"
}Response
The created run plan
Example response
{
"data": {
"runPlan": {
"template": "accent-handling",
"scenarios": [
{
"variables": {
"customerName": "John Doe",
"appointmentDate": "2024-02-15"
}
}
],
"flows": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"happyPath": true,
"edgeCases": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"variables": {
"tier": "premium"
}
}
]
}
]
},
"runPlanJob": {
"simulationRunPlanId": "9a8b7c6d-5e4f-3210-abcd-ef9876543210",
"simulationRunPlanJobId": "7f3e4d2c-8a91-4b5c-9e6f-1a2b3c4d5e6f",
"status": "PENDING",
"createdAt": "2024-01-15T10:30:00Z"
}
}
}Changes
- info
added the new optional request property
/ - info
added the new optional request property
/ - info
added the required property
//to the response with the status
- info
- breaking
the request's body type changed from
objectto no type - warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- warning
removed the request property
- info
added to the request body
oneOflist - info
added the required property
//to the response with the status
- breaking