Run a simulation
Changed onStarts a simulation and returns the run.
Send template to run one of the built-in templates: it supplies the metrics and checks, and for some templates the flows too, so the request only names the agent and the direction. Send plan to describe a simulation yourself and run it once. Send planId to run a plan you already have.
template and plan both resolve to a run plan, returned as simulationRunPlanId. Add saveAsPlan to keep it, or read it back to see exactly what ran. A plan built from a template is a snapshot: retuning the template later never changes what that plan runs, which is what makes a saved one safe to pin in CI.
Request
- Base URLhttps://api.roark.ai
- URLhttps://api.roark.ai/v1/simulation/run
- AuthHTTP bearer
Request body
Example request
{
"saveAsPlan": true,
"plan": {
"name": "Billing regression",
"direction": "OUTBOUND",
"maxSimulationDurationSeconds": 300,
"agentEndpoints": [
{
"id": "7c9e6679-7425-40de-944b-e07fc1f90ae7"
}
],
"metrics": [
{
"slug": "customer_satisfaction"
}
],
"flows": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"happyPath": true,
"edgeCases": "ALL"
}
]
},
"variables": {
"orderNumber": "12345"
}
}Response
The run that was started
Changes
- info
added to the request body
oneOflist
- info
- breaking
the
///request property type changed fromstringto no type - breaking
the
//request property type changed fromstringto no type - info
added the new optional request property
/ - info
added
subschema #1to the///request propertyanyOflist - info
added
subschema #1to the//request propertyanyOflist
- breaking