add module api for ajax, rpc, etc