set up API (usable through querystring or POST), demo server-side HTML use