API updated to be RESTful