sample REST service code