rest based example