Skip to main content
Version: 2.3

POST

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

Request​

Example request body

curl -X POST \
http://localhost:8080/api/simulations/batch \
-H 'Cache-Control: no-cache' \
-H 'Content-Type: application/json' \
-d '{"input":{"system":{"fillFactor": 0.5}},
"ticks": 300,
"runs": 200,
"name":"Game of Life"
}'

Body Schema​

ParameterTypeRequiredDescription
namestringtrueName of model to create batch simulation for
configobjectKey value object of config keys to update with values to update to.
inputobjectKey value object of input field to update with values to update to.
runsintegertrueNumber of times to run full simulation.
ticksintegertrueNumber of ticks to run each simulation run to.

Example request body

{
"input": { "system": { "fillFactor": 0.5 } },
"config": {
"core-abm-spark.master-url": "local[*]",
"core-abm-spark.log-level": "WARN"
},
"ticks": 300,
"runs": 200,
"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

NameTypeRequiredDescription
idstring(uuid)true
namestringtrue
descriptionstringtrue
publicbooleantrue
sessionstring(uuid)truesimudyneSessionID cookie
kindstringtrue

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 batch simulations for model

Request​

Example request body

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

Parameters​

NameLocated inDescriptionRequiredSchema
namequery paramName of modelYesstring

Response​

StatusMeaningDescription
200OKSuccessfully created.
400Bad RequestRequest errorInline
404Not FoundSimulation not foundInline
500Internal Server ErrorInternal server errorInline

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 400

NameTypeRequired
messagestringtrue

Example 400 response body

{
"message": "No usable value for ticks\nDid not find value which can be converted into int"
}

Status Code 404

NameTypeRequired
messagestringtrue

Example 404 response body

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

Status Code 500

NameTypeRequired
messagestringtrue

Example 500 response body

{
"message": "Exception during input. Cannot set float field `fillFactor` to non float value `\"three\"`."
}