Importing external resources via REST as nodes or other entities
I haven't looked at that module yet, but pretty much everything that involves the storage of an entity goes through the storage handler of a given entity type.

Drupal 8 provides to real implementations, SqlContentEntityStorage for content entities stored in the database and ConfigEntityStorage for config entities stored in configuration. And a few test and example implementations too.

So the first thing you need to implement is your own storage. Do whatever you want in the relevant methods like load()/save()/delete(), see EntityStorageInterface.

Additionally, you will have to implement a entity query, so you can create lists with conditions, sorts and so on. That also comes from storage (getQuery()), initialized based on a given service name, see for example entity.query.sql and entity.query.config. That's a factory that returns the actual query object and in there, you can again do whatever you want. For content entities, it's transformed to an SQL query while config entity queries are actually mostly implemented in PHP, with some optimizations and lookups.

If you also want to use views, you have to write a backend for that too, since it doesn't use entity query (yet). There's https://www.drupal.org/project/efq_views, not sure how far it is for Drupal 8.