/content/guides/simstad/simstad.png

API

Contributors

mange61

Funding

formas
smartbuilt

API

Omni provides a read-only HTTP API used by the SimStad Interface. Exhibition maintainers normally edit content through Omni Admin and can skip this chapter. Use these endpoints when debugging returned content or developing another Interface.

All paths are relative to the Omni server, for example http://localhost:8000 during local development. JSON endpoints use GET and return either an object or an array. A request for an unknown key returns 404 Not Found.

Language

Add ?language=sv or ?language=en to request translated fields in Swedish or English. Swedish is used when the parameter is omitted.

https://YOUR_OMNI_SERVER/get_scenario/example/?language=en

City Exhibits and Collections

EndpointDescription
GET /get_cities/All City Exhibits.
GET /get_city/{city_key}/One City Exhibit and its configuration.
GET /get_collections/All Collections across the server.
GET /get_collection/{collection_key}/One Collection and its ordered Scenarios.

The Interface normally starts with the City Exhibit selected by CITY_ID, then follows its featured Collections rather than displaying every item returned by the list endpoints.

Scenarios and Rasters

EndpointDescription
GET /get_scenarios/All Scenarios across the server.
GET /get_scenario/{scenario_key}/One Scenario, including its Layers and display configuration.
GET /get_rasters/All Raster image and video metadata.
GET /get_raster/{raster_key}/One Raster and its media and preview paths.

Media files are separate from the JSON response. Receiving valid Raster metadata does not place the corresponding files on the Interface or Unreal computer. The complete Omni media folder must be available to the Interface, and media/rasters must be mirrored to Unreal's DigitalTwin/Datasets folder. This is essential for the applications to display the same content; see Synchronization.

Legends, Symbols, and Tags

EndpointDescription
GET /get_legends/All structured Legends.
GET /get_legend/{legend_key}/One Legend and its ordered entries.
GET /get_symbols/All Legend Symbols.
GET /get_symbol/{symbol_key}/One Legend Symbol and its image path.
GET /get_tags/All Raster Tags.
GET /get_tag/{tag_key}/One Tag.

Localization

EndpointDescription
GET /get_localization/Combined key-value dictionary for shared Interface text and translated model content.

The localization response includes Localized Strings and generated keys for City Exhibit, Collection, Scenario, Raster, Legend, Legend entry, sequence-label, and Tag text. Request the endpoint separately for each supported language.

Rendered Legend pages

Omni also provides HTML pages intended for the screens surrounding the city model. Unlike /get_legend/, these routes use Scenario keys because they combine a Scenario description with its structured Legend or Legend image.

EndpointDescription
GET /legend/{scenario_key}/Renders one Scenario description and Legend.
GET /legend/{scenario_key_1}/{scenario_key_2}/Renders two Scenarios for Interface comparison mode.

Both routes accept the language query parameter. The comparison route also accepts direction=tb, bt, lr, or rl to orient the two Legends for a particular physical screen.

https://YOUR_OMNI_SERVER/legend/scenario_1/scenario_2/?language=en&direction=tb

These pages support embedding and can be displayed in an iframe or a PIXILAB Blocks Web component. See Omni and Legends for display configuration and screenshots.