I had to modify your script because I am running on the UDM-Base (’/api/auth/login’ for login, ‘/proxy/network’ added in front of the other API calls). I am able to retrieve macs, but when I call the
payload = {"cmd": "forget-sta", "macs": macs}
url = urljoin(base_url, "/proxy/network/api/s/{site_name}/cmd/stamgr".format(site_name=site_name))
resp = sess.post(url, json=payload)
I get a 404 response status “Not Found”. Any ideas on how to fix that?