ensure index
add restful api interface