Issue #267: import via api

Implementing issue #267 - the import/export tasks now use the API, so only the server code talks to the DB