unifi_console_traffic_object
Preview, then apply, changes to UniFi console traffic objects: bandwidth limits, QoS priority, schedules, internet blocking, and WAN/VPN routing for networks or clients.
Instructions
Preview, then apply, a change to the console's traffic objects (Traffic Management: bandwidth limits and priority, schedules, internet blocking and routing for networks or clients).
Two steps, always: call with confirm=false to get a read-only preview (before, after, diff, warnings, a
fingerprint); call again with the same fields plus confirm=true and that fingerprint to apply. The object is
re-read first, so a stale preview is refused. Target networks (by name) or clients (by MAC). QoS: qos_enabled,
qos_mode (LIMIT or PRIORITIZE), download_limit / upload_limit in kbit/s (10000 = 10 Mbit/s; 0 switches one off),
download_burst / upload_burst (DISABLED, SHORT, LONG) and qos_schedule. block_internet (with block_schedule) cuts
internet access for the targets, and route_* sends traffic out through another WAN or VPN client network; both need
acknowledge_blocking / acknowledge_reroute when the object is switched on. A new object starts switched off unless
enabled=true; once enabled it takes effect at once. App, domain and region matchers and the local-network block are not
edited. Applying also needs UNIFI_CONSOLE_ENABLE_WRITES=true and 'traffic_object' in UNIFI_CONSOLE_WRITE_ENTITIES.
The console only accepts the whole object, so updates send all of it. After applying, the object is read back and the
result reports verified true/false, the diff, and the exact rollback call. Every write is journalled.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |