Last updated on 16th July 2024
Creates a new simulation and returns the object with its various attributes.
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
Parameter | Type | Required | Description |
---|---|---|---|
name | string | true | Name of model to create interactive simulation for |
Example request body
{
"name": "Game of Life"
}
Status | Meaning | Description |
---|---|---|
200 | OK | Successfully created. The session ID is returned in a cookie named simudyneSessionID . You need to include this cookie in subsequent get requests. |
404 | Not Found | Simulation not found. |
Status Code 200
Name | Type | Required |
---|---|---|
id | string(uuid) | true |
name | string | true |
description | string |
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
Name | Type | Required |
---|---|---|
message | string | true |
Example 404 response body
{
"message": "SimulationRegistry: Could not find requested simulation default."
}
Returns a list of running interactive simulations for model
Parameters
Name | Located in | Description | Required | Schema |
---|---|---|---|---|
name | query param | Name of model | Yes | string |
Example request
curl -X GET \
'http://localhost:8080/api/simulations/interactive?name=Game%20of%20Life' \
-H 'Cache-Control: no-cache'
Status Code 200
Name | Type | Required | Description |
---|---|---|---|
results | [object] | true | |
» id | string(uuid) | ||
» name | string | ||
» description | string | ||
» public | boolean | ||
» session | string(uuid) | simudyneSessionID cookie | |
» kind | string |
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
Name | Type | Required |
---|---|---|
message | string | true |
Example 404 response body
{
"message": "SimulationRegistry: Could not find requested simulation default."
}