QoS profile management (create/update/delete dedicated QoS profiles) is not available via the UniFi API. The traffic routing tools described here use the supported
/rest/routing endpoint. For bandwidth management, use traffic routes with the shape action.What you can do
Traffic routes
Create routing policies to allow, deny, mark, or shape specific traffic flows.
Bandwidth shaping
Apply bandwidth limits to specific traffic using the shape action.
DSCP marking
Mark packets with DSCP values for downstream QoS enforcement.
DPI analytics
Identify top bandwidth applications and per-client usage across your network.
Traffic routes
Traffic routes are policies that match specific traffic flows and apply an action:allow, deny, mark (DSCP), or shape (bandwidth limit). Routes are evaluated in priority order—lower priority numbers run first.
Example prompts:
- “Show all traffic routing policies”
- “Create a rule to prioritize video conferencing traffic”
- “Limit streaming traffic to 50 Mbps”
List traffic routes
Create a traffic route
All route creation requiresconfirm=True. Use dry_run=True to validate first.
Example: prioritize video conferencing with DSCP marking
Traffic route parameters
DSCP values reference
Update a traffic route
Delete a traffic route
DPI statistics
Deep Packet Inspection (DPI) statistics show you which applications and categories are consuming the most bandwidth on your network. This is a read-only capability—no confirmation is required. Example prompts:- “What are the top 10 applications by bandwidth in the last 24 hours?”
- “Show bandwidth usage by category”
- “How much bandwidth is Netflix using today?”
- “What is device aa:bb:cc:dd:ee:01 using the network for?”
Site-wide DPI statistics
1h, 6h, 12h, 24h, 7d, 30d
Top applications by bandwidth
Uselist_top_applications to quickly identify the highest-bandwidth applications.
Example prompt: “Show me the top 5 bandwidth hogs this week”
Per-client DPI statistics
See what a specific client is doing on the network by their MAC address. Example prompt: “What applications is the laptop at aa:bb:cc:dd:ee:01 using?”Example: identifying and shaping heavy bandwidth users
This workflow shows how to use DPI data to identify heavy users and then apply a traffic shaping policy.1
Find top applications
2
Check per-client usage
3
Apply bandwidth limit on guest VLAN