Run a simulation
Runs a simulation and returns the run that was started.
Describe the simulation in plan, or name an existing one with planId. Every run
is backed by a run plan, but you only get one you can see and re-use if you ask for it
with saveAsPlanName; otherwise the plan is created hidden and simply carries the run.
This replaces creating a plan and then starting a job against it. The response carries
simulationJobCount, the number of calls the run places, each of which is billed.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Input for running a simulation, either from an inline configuration or an existing plan.
The simulation to run. A run plan is created for it behind the scenes.
Run a plan that already exists instead of describing one. Mutually exclusive with plan.
Keep this run as a reusable plan under this name.
Left unset, the run still needs a plan to execute, but it is created hidden: it does
not appear in GET /v1/simulation/plan and exists only to carry the run. Applies only
alongside plan, since planId names a plan that already exists.
1"Billing regression"
Runtime variables that override the values defined on the plan. Accepts one of two formats:
Option 1, global (a flat key-value object): { "orderNumber": "12345", "environment": "staging" }
Option 2, per-scenario (an array of objects with scenarioId + variables): [ { "scenarioId": "550e8400-...", "variables": { "orderNumber": "12345" } }, { "scenarioId": "7a3d2e1f-...", "variables": { "orderNumber": "67890" } } ]
On a flow-based plan the global format applies to every variant the run resolves. The per-scenario
format targets scenarios, so use flowVariables to override a specific flow or variant instead.
- object
- object[]
Runtime variable overrides targeted at the plan’s customer flows, taking precedence over the values pinned on the flow attachment.
An entry without variantId applies to every variant the attachment resolves. A flow that is not
attached to this plan, or a variant that does not belong to the flow, is rejected rather than ignored.
Response
The run that was started
A started simulation run.