test for restfule api