Checking from container new "push"

Is there a way how to check if a new push has been made? I would like to deploy balenaOS with PiJuice UPC. The device wakes up every hour, checks if there is internet access. If yes, then it checks if there are new containers on openBalena server. If no, then it uploads data to the server and goes to sleep. I need some way how to wait until new containers are downloaded and then send him to sleep.

Thanks

You can use the supervisor API to get the /v1/device endpoint and check the update_pending key. https://www.balena.io/docs/reference/supervisor/supervisor-api/#get-v1device

Is this what you’re looking for?

Yes !!! This is what I need. Thank you.