RESTfulAPI implementation (not finished)