Ubios-udapi-server ((install)) -

The script prints a voucher code. The customer types it in. No human intervention required. Integrate with a web security gateway. If a device is flagged for malware, have the security system call the API:

POST /proxy/network/api/v2.1/sites/default/clients/aa:bb:cc:dd:ee:ff/block ubios-udapi-server

import requests import json url = "https://192.168.1.1/proxy/network/api/v2.1/sites/default/guest/vouchers" headers = "X-API-Key": "your-key-here", "Content-Type": "application/json" payload = "minutes": 120, # 2 hours "bandwidth_up": 1024, # Limit to 1 Mbps "bandwidth_down": 2048, "qty": 1 The script prints a voucher code

response = requests.post(url, headers=headers, data=json.dumps(payload), verify=False) print(response.json()['data'][0]['code']) Integrate with a web security gateway

In the rapidly evolving landscape of network management, automation is no longer a luxury—it is a necessity. For network engineers, MSPs, and smart home enthusiasts using Ubiquiti hardware, the ability to script, integrate, and automate tasks is critical. Enter the ubios-udapi-server .

| Function | HTTP Method | URI Path | | :--- | :--- | :--- | | List sites | GET | /proxy/network/api/v2.1/sites | | List devices | GET | /proxy/network/api/v2.1/sites/site/devices | | List clients | GET | /proxy/network/api/v2.1/sites/site/clients | | Block a client | POST | /proxy/network/api/v2.1/sites/site/clients/mac/block | | Create network | POST | /proxy/network/api/v2.1/sites/site/networks | | Update firewall rule | PATCH | /proxy/network/api/v2.1/sites/site/firewall/rules/id |