Implement REST-api