Use service in rest