rest template work