Add necessary changes to make the API work on Modular code

Jira Issue: WP-1041
Merge pull request #1 from ziransun/WP-1021

Add necessary changes to make the API work on Modular code