Reading pushbutton statuses and running a RESTful API