Skip to main content
Version: 2.2

Interactive Simulations


POST

Creates a new simulation and returns the object with its various attributes.

Request​

Example request

curl -X POST http://localhost:8080/api/simulations/interactive \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name": "Game of Life"}'

Body Schema

ParameterTypeRequiredDescription
namestringtrueName of model to create interactive simulation for

Example request body

{
"name": "Game of Life"
}

Response​

StatusMeaningDescription
200OKSuccessfully created. The session ID is returned in a cookie named simudyneSessionID. You need to include this cookie in subsequent get requests.
404Not FoundSimulation not found.

Response Schema​

Status Code 200

NameTypeRequired
idstring(uuid)true
namestringtrue
descriptionstring

Example 200 response body

{
"id": "d7558ad9-3405-4a4c-972a-531a87fdcd27",
"name": "Game of Life",
"description":
"The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970.",
"public": false,
"session": "760b2d3e-20b2-42e6-9655-58e662e79e73",
"kind": "pojo"
}

Status Code 404

NameTypeRequired
messagestringtrue

Example 404 response body

{
"message": "SimulationRegistry: Could not find requested simulation default."
}

GET

Returns a list of running interactive simulations for model

Request​

Parameters

NameLocated inDescriptionRequiredSchema
namequery paramName of modelYesstring

Example request

curl -X GET \
'http://localhost:8080/api/simulations/interactive?name=Game%20of%20Life' \
-H 'Cache-Control: no-cache'

Response​

StatusMeaningDescription
200OK
404Not FoundSimulation not found.

Response Schema​

Status Code 200

NameTypeRequiredDescription
results[object]true
» idstring(uuid)
» namestring
» descriptionstring
» publicboolean
» sessionstring(uuid)simudyneSessionID cookie
» kindstring

Example 200 response body

{
"results": [
{
"id": "0021674-3e3c-4ca7-87fc-e800c69feecd",
"name": "Game of Life",
"description": "string",
"public": true,
"session": "40dc68d-d798-46cb-bcfb-06c6a16a3492",
"kind": "pojo"
}
]
}

Status Code 404

NameTypeRequired
messagestringtrue

Example 404 response body

{
"message": "SimulationRegistry: Could not find requested simulation default."
}