mpapiComponent getApi refactoring