WIP: Add entity API integration for field discovery

@nader77 can you change this please.