change db api(add uuid to app_instance table) and add some methods to appliction api