POST /simulations

Creates a new simulation.

Request

entitiesrequired

An object of named entities to be simulated. Must include at least one entity.

seedoptional

The seed for the simulation's random number generator. Must be an integer greater than or equal to 0. Defaults to 0.

Success

Upon success, responds with a 201 Created with a Simulation body.

idrequired

A unique identifier.

identitiesrequired

An object of named entities to be simulated. Must include at least one entity.

seedoptional

The seed for the simulation's random number generator. Must be an integer greater than or equal to 0. Defaults to 0.

statusrequired

May be one of pending or drained.

The Stream Simulation endoint may only be called for a simulation when its status is pending. Upon calling the endpoint,status will change todrained.

createdAtrequired

The timestamp when the simulation was created

Example

A request body for a simulation with a single "users" stream:

{
  "seed": 7,
  "streams": {
    "users": {
      "type": "object",
      "properties": {
        "id": { "type": "integer" },
        "name": { "type": "string" }
      }
    }
  }
}
{
  "id": "1870cb14-2439-4093-8821-d42c133ea01f",
  "seed": 7,
  "streams": {
    "users": {
      "type": "object",
      "properties": {
        "id": { "type": "integer" },
        "name": { "type": "string" }
      }
    }
  },
  "status": "pending",
  "createdAt": "2025-04-16T03:15:24.362Z",
}