This snap runs a simple python http server with FastAPI that serves, hostname, kernel version, apt packages and snaps in json format.
To get the latest stable version of the snap from Snapstore, run:
sudo snap install software-inventory-exporterTo get the latest development version of the snap, build from the source code and install with --dangerous flag:
make build
sudo snap install software-inventory-exporter.snap --dangerous
# connect interfaces
sudo snap connect software-inventory-exporter:snap-apt-dpkg-dbTo configure the snap for your own environment, create a config.yaml file in $SNAP_DATA (see Snap Environment Variables) directory with the desired entries. By default, bind_address and port are configured to the values 0.0.0.0 and 8675, respectively.
The configuration should have the following format:
settings:
bind_address: <IP>
port: <port>After the installation and configuration you should be able to use the API. Check the automatic documentation by accessing /docs by accessing:
http://<IP>:<port>/docs
From there you will be able to see all endpoint available and try it out.