REST API: Refactoring, fixed allowed / blocked connections, disabled type for existing connections