Ok, interesting stuff, but not exactly the experience I am looking for. I prefer to use a setting in uci to decide what action the button should perform. Where I am stuck is how update uci with the web cgi-bin api.
I changed the title of my question to better reflect what I am asking for help with.