rebuild api and add foreign,domestic module