emit data via the api, and import from api