updated the RESTful api handlers