Skip to main content

Republish Retained

POST 

/api/v1/super-admin/republish-retained

Rebuild the broker's retained config from Postgres — AZD-43, §9b.

The broker is a cache of devices.config; this is what makes that claim true rather than aspirational. Run it after a broker restore, a node replacement, or any time the retained state is in doubt.

Idempotent and safe at any time. Each device gets its existing config_version, not a new one, so a device that already has the config ignores it and one that lost it applies it. Running it twice costs two publishes and changes nothing — which matters, because the person running it is mid-incident and will run it twice.

dry_run=true reports which devices would be published to without touching the broker. device_uid=... narrows it to one unit, for when the fleet is fine and one box is not.

Returns per-device results rather than a count: during an incident the question is which devices failed, not how many succeeded.

Request

Responses

Successful Response