Server¶
A MiniSky runtime can be controlled by standard tools like curl through an experimental REST API:
# make sure to install the optional CLI/server dependencies, e.g. from PyPI:
pip install 'minisky[cli]' minisky-xplane-navdata
minisky server
The OpenAPI reference can then be accessed at the /docs HTTP endpoint.
You can also optionally customise the server through a configuration TOML file (see the configuration guide).
Note
The REST API currently exposes a single runtime. Support for managing multiple runtimes is planned.
Interactive console¶
Once you have a server running, attach an interactive console with:
minisky console
To send commands:
> MCRE 3
> POS EHAM
> KL001 ALT FL200
To send an HTTP request or a minisky operation, prefix it with /:
> /all
> /conflicts
> /load example.scn
> /clear
> /exit
/load reads a scenario file on the client machine, relative to the console client's current working directory, and uploads its contents to the server. /clear and /exit are handled by the console itself. Otherwise, all slash-prefixed paths are sent as HTTP GET requests.
Streaming¶
Warning
This is experimental and can change at any time without notice.
To get WebSocket simulation snapshots on /stream, use:
minisky stream
minisky stream --raw
See Snapshot, SimInfo and AcData API reference for more information.