unifi_console_data_retention
Preview and apply UniFi console data retention changes for statistics and events. Confirm a fingerprint to update retention hours after a read-only preview.
Instructions
Preview, then apply, a change to how long the console keeps statistics and events (Control Plane > Network data retention).
Two steps, always: call with confirm=false to get a read-only preview (the retention fields only: before, after, diff, warnings, a fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. Fields: data_retention_setting_preference (auto or manual) and, with manual, hours_5minutes, hours_hourly, hours_daily, hours_monthly, hours_others. The rest of the group (auto-backup, analytics and a Google Maps key) is sent back exactly as read and never shown. Shortening retention deletes older data at the next prune; longer retention uses more storage. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'data_retention' in UNIFI_CONSOLE_WRITE_ENTITIES. Every write is journalled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |