add web restful code and doc