Getting a list of micro simulations and micro simulation groups
It returns a list of micro simulations and micro simulation groups.
Authentication phase
Before using the endpoint, you must run the authentication phase (→ Login).
After the authentication, a session opens and a valid session token persists until:
- The end of the session time-out, that is set through the parameter sessionTimeout (→ OptimaWSI configuration > OptimaAuth node).
- An explicit Logout call (→ Logout).
Request
GET
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optimissim/simulations/
Request parameters
| Parameter | Required | Description |
|---|---|---|
| status | NO |
It filters the response to show micro simulations with a specific state. Multiple usages of the parameter are connected by logical or. For the complete list of the possible response statuses, see → Optima Micro: error codes and response status > Response Status. |
| description | NO | It filters the response to show micro simulations with a specific description. Supports SQL LIKE search expressions. |
| minCreatedOn | NO | It filters the response to show micro simulations created after this point in time. |
| maxCreatedOn | NO | It filters the response to show micro simulations before this point in time. |
Request content-type
Not applicable.
Request body (payload)
Not applicable.
Response status
| HTTP status | Description |
|---|---|
|
200 OK |
If at least one micro simulation was found. |
|
404 Not Found |
If no micro simulation was found, the service answers with 404 and with a proper message in the entity. |
For the complete list of error codes and messages, see → Optima Micro: error codes and response status > Error codes of the Optima Micro API.
Response content-type
application/json
Response output
JSON message with micro simulation groups and micro simulations.
Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optimissim/simulations/?status=finished&minCreatedOn=2018-09-10T14:43:10.770&maxCreatedOn=2018-09-10T16:45:00&status=received&description=Signals%
Response status
| HTTP status | Description |
|---|---|
|
200 OK |
Result of the processed request. |
Response output
{
"microSimulationGroupId": "1bce3414-3243-46a1-aafb-aed4e05cdeb4",
"subnetId": 2,
"description": "Accident at main station",
"microSimulations": [
{
"microSimulationId": "a18f1529-796a-4e9f-9cdd-3f9422094bb3",
"description": "Signals 1 - increase outbound",
"simulationPeriod": 3600,
"status": "RECEIVED",
"progress": 0.6605707318159835,
"createdOn": "2018-09-10T16:21:25.89+02:00",
"lastUpdate": "2018-09-10T16:21:25.89+02:00"
},
{
"microSimulationId": "3daa58d5-5d1e-4a04-aed3-1853371ea779",
"description": "Signals 1 - increase centre",
"simulationPeriod": 3600,
"status": "FINISHED",
"progress": 0.42779328099217095,
"createdOn": "2018-09-10T16:21:25.905+02:00",
"lastUpdate": "2018-09-10T16:21:25.905+02:00"
}
]
}