Fix restful api bug and Add create app fnc