It’s not really documented anywhere officially. I’ve found the knowledge over the years from searching the ubnt forums. But I stopped using unifi equipment a few years ago for similar reasons.
This forum thread is probably the best starting point I can give you but configuring unifi APs via ssh for any reason other than maybe a botched IP configuration is a bad idea
I’ll just never get over the fact that young adults are now waxing nostalgic about things that happened when I was a young adult.