create api adapter, and auto load api handler