Add flat patterns for Api
Add register/autodiscover system for Api