Implementing httprestendpoint