rest resource working