Rebuild the Rest API to handle commands and multiple value polling