This is in php but looks like line 161 shows for the UDM Pro that /api/auth/login is the login path.
https://github.com/Art-of-WiFi/UniFi-AP ... Client.phpLine 169 shows them also sending the application-type header which I also had to do:
curl_setopt($ch, CURLOPT_HTTPHEADER, ['content-type: application/json; charset=utf-8']);
And then their line 3997 shows /proxy/network added to the base url for the various api calls.
Now, what is interesting for me:
/usr/bin/curl --insecure -b /tmp/unifiCookie -X GET 'https://192.168.0.1:443/proxy/network/api/s/default/stat/alluser'
returns a ton of JSON. If I drop the -b and cookie path, it fails with LoginRequired.
But this: (the code from your exiting plugin, modified for the new baseURL) fails with Not Found:
/usr/bin/curl --insecure -b /tmp/unifiCookie --data '{"type": "all", "conn": "all"}' -X PUT 'https://192.168.0.1:443/proxy/network/api/s/default/stat/alluser'