Getting scenarios of a subnetwork
Returns the scenarios (see → Scenarios) of a micro simulation subnetwork.
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 section).
- An explicit Logout call (→ Logout).

Request
GET
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optimissim/subnetwork/{SubnetworkId}/scenario
The path parameter SubnetworkId must be specified as obtained from → Getting information about micro simulation subnetworks.
Request parameters
Not applicable.
Request content-type
Not applicable.
Request body (payload)
Not applicable.

Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. The request has success if both conditions are verified:
|
401 Unauthorized |
The requested resource is restricted and requires authentication. Please see → Login (deprecated). |
404 Not Found |
If the SubnetworkId is not found, the response is: No microsimulation subnetwork found from Subnet SubnetworkId
If the SubnetworkId does not have any scenarios associated, the response is: No scenario found for Subnetwork with Subnet SubnetworkId |
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/xml
Response output
JSON message with scenarios, their identifiers and descriptive data.

Request
https://<OPTIMA_HOST_IP_ADDRESS>:<PORT_NUMBER>/optimissim/subnetwork/13/scenario
Response status
HTTP status | Description |
---|---|
200 OK |
Result of the processed request. The request has success if both conditions are verified:
|
Response output
{ "subnetId": 13, "name": "Willy-Brandt-Allee", "description": null, "availableScenarios": [ { "id": 1, "description": "A scenario with a Datex2 event setting a signal program" }, { "id": 12, "description": "A scenario with a Datex2 event setting a new signal program" } ] }