Adding RESTful api