I need a way to query the snap store (from a cloud lamba function) for information about installed snaps on a number of gateways. I have the aggregated list of snaps, and would need to check if there are new versions and possibly if there has been reported vulnerabilities.
UPDATE… https://api.snapcraft.io looks promising, but I get a 404 “X-Ubuntu-Series header is required.” error
Why do you need this? If you own the gateways and the snaps, the store does send you an e-mail if your snaps contain packages for which there have been security fixes, so you can then rebuild the snaps. The devices will update automatically to new snap releases.
We need to manage the life-cycle of the snaps outside the default auto-update service. The reason being we need to control when updates are done. With the current setup, we can only set daily timespans for when to prevent updates or disable it completely. This has left us to disable the update service.
Not a problem! Hey, would you mind sharing the list of snaps with me, or telling me which brand store they are in? The info API is really meant for use by snapd clients only, so we want to monitor and ensure that usage for your snaps is consistent with the API’s design parameters.
Our intent was to call the API once a day using an aggregated list (not one per gateway). I would have been happy to do this from the gateway, provided I could get the response in a json format. But as of what I can see, the only way to get version info from the gateway would be using the >snap info snamname command, but it’s not useful as it would net be reliable to parse.
I don’t want to exhaust your api, so please let me know it you have some other suggestions