Port domains page to new API
Fix unit tests for API