Resin Supervisor HTTP API Device State Updates


#1

I switched my application to use multi-container and everything is working quite well.
Once issue I face is determining when an update has finished downloading so I can release the update lock and restart the services.

Previously, I would locally on the device perform a GET /v1/device to the SuperVisor’s HTTP API and could determine the download progress/downloaded. However, in multi-container this no longer seems to work.
The download_progress is always null. Furthermore update_pending and update_downloaded will jump between true and false while a download is still in flight. Is there a /v2 route or someway I can on the device determine when all service’s downloads are complete? I would prefer to do this locally on the device and not using the remote API.


#24

Hi @adamp! Sorry it took us a while to respond to this. Indeed the v1 API only works in single-container apps.
We’re working on a v2 API: https://github.com/resin-io/resin-supervisor/pull/652 - should be merged soon so it will probably be added in the next resinOS release.