Is there a way change which WAN to use with API?
I've searched, but I've seen only cloud API.
The WG Cloud API is the only way to manage firewalls via API. There is not a function to switch WAN connections specifically, but you can modify SD-WAN settings in a policy, which can change what WAN connection traffic goes out.
WatchGuard Customer Support