Editor
The Editor module enables network-level modifications to existing scenarios. It allows users to apply targeted structural changes to the simulation network — for example, to simulate roadworks, incidents, traffic control measures, or policy interventions.
Through the editor/scenario/<id> endpoint, users can modify selected elements of the scenario network without needing to rebuild it from scratch.
The system supports a variety of patch types, including:
- Closing edges (e.g. road closures)
- Removing lanes (e.g. temporary capacity reduction)
- Adjusting speed limits
- Changing allowed vehicle classes (vClass restrictions)
- Modifying lane to lane connections at intersections
Endpoint: editor/scenario/<id>
GET
The GET editor/scenario/<id> request returns the current state of the scenario network as a detailed GeoJSON structure, including edges, lanes and junction shapes.
This file reflects the scenario after any previous edits have been applied.
It allows clients (e.g., frontend editors or automated tools) to retrieve the full network geometry and metadata to enable interactive editing, validation, or visualization of the scenario.
The returned GeoJSON structure includes:
- Edge geometries and attributes (e.g., speed, allowed vehicle classes, fromNode, toNode)
- Lane geometries, connections (outgoing lanes), and lane-specific metadata
- Junction geometries
GET: Authorization
This endpoint requires authentication. The authenticated user (or session, in case of guest access) must be the owner of the scenario. Otherwise, a HTTP 404 response is returned.
GET: Response
PATCH
The PATCH editor/scenario/<id> request allows users to apply targeted modifications to the scenario network by submitting only the features that should be changed.
The request body must contain a valid GeoJSON structure that includes the modified features (i.e., edges or lanes that should be updated).
Each feature in the GeoJSON payload triggers a corresponding patch operation for the SUMO simulation network. Depending on the element type (edge or lane), different types of updates may be applied — such as changing allowed vehicle classes, adjusting speed limits, disabling lanes, or altering connection behavior.
The modification is performed asynchronously: upon receiving the request, the API schedules a background task that applies the patch to the scenario.
The response includes a unique task ID (result_id) and a status_url that can be used to track the progress of the operation.
PATCH: Authorization
Only users who own the scenario (or sessions in the case of guest access) are allowed to modify it. If the scenario is not accessible or does not exist, a 404 response is returned.
PATCH: Request
Changing Edge Properties
The following JSON structure shows an example of a PATCH request that updates several edge properties.
This method currently only allows modifying the number of lanes (numLanes) for the specified edge(s):
| JSON | |
|---|---|
This results in the following patch being applied to the SUMO scenario network:
Changing Lane Properties
The following JSON structure shows an example of a PATCH request that updates lane properties.
| JSON | |
|---|---|
This results in the following patch being applied to the SUMO scenario network:
| XML | |
|---|---|
Please note, that edge and lane changes are merged in the patch if possible.
Deleting Edges or Lanes
The following JSON structure shows an example of a PATCH request that deletes an edge.
The action property specifies the intended operation to be performed on the feature.
Setting action to delete will permanently remove the edge or lane from the scenario network.
If "action" : "delete" is provided, all other properties are ignored.
This results in the following patch being applied to the SUMO scenario network:
Closing Edges or Lanes
The following JSON structure shows an example of a PATCH request that closes an edge and a lane on another edge.
Setting action to close will store the currently allowed vehicle classes and then disallow any vehicle on that edge or lane.
If allow is present in the properties of the feature in the request, but it is empty, then it is assumed, that the edge (or lane) has no access restrictions.
Thus allow="all" will be saved as original access properties.
If allow is not present in the properties of the feature in the request, then it is assumed, that the access restrictions of the edge (or lane) should be retrieved from the current network and stored for the re-opening.
Other properties, e.g. speed or name will be merged in the patch.
This results in the following patch being applied to the SUMO scenario network:
| XML | |
|---|---|
Opening Edges or Lanes
The following JSON structure shows an example of a PATCH request that opens an edge and a lane on another edge.
Setting action to open will restore the allowed vehicle classes on that edge or lane.
If allow is present in the properties of the feature in the request and it is not empty, then these values are taken as the new restrictions for that lane or edge.
In this case, the "action": "open" is optional (see edge 123#4 in the example above).
The patch will override the allowed vehicle classes for that edge.
If allow is not present (or it is present and empty), then it is assumed, that the access restrictions of the edge (or lane) should be restored from previous values in the network.
If there are no previous values to be restored in the network, the edge (or lane) will be opened by default for all vehicle classes.
Other properties, e.g. speed or name will be merged in the patch.
This results in the following patch being applied to the SUMO scenario network:
| XML | |
|---|---|
Modifying Connections
Connections can be modified by changing properties of lanes only, i.e., features with the type lane.
It is similar to modifying basic lane properties. The following JSON structure shows an example of a PATCH request that updates the lane to lane connections.
| JSON | |
|---|---|
This results in the following connections patch being applied to the SUMO scenario network:
PATCH: Response
If the patch request is accepted, the API returns a JSON response containing a unique task ID and a status URL: