add restful api for mongodb