Snapd REST API: configure refresh timer?

Hello,

Are there any plans to support setting the refresh timer via the snapd REST API?

Adding some context to this question…

In this scenario, a certain number of systems in a network must remain operational. To minimize service interruptions while refreshing, the idea is to space out the refresh times on all systems. (E.g. system A refreshes at 20:00, system B at 20:30, etc)

Given there is a large number of systems, running sudo snap set system refresh.timer=20:00-22:00 manually on each would be impractical.

Since we’re already using the REST API for other cases, it would be convenient if it supported setting the refresh timer as well.

Thanks!

The snap set system .. command goes through the REST API.

I’m using a http snap, but you can issue the request yourself like so:

$ sudo snap run http PUT \
    snapd:///v2/snaps/system/conf \
    refresh.timer=20:00-22:00 

Apaprently there’s some documentation in the wiki: https://github.com/snapcore/snapd/wiki/REST-API#put-v2snapsnameconf

Thanks for the reply @mborzecki