add new API for retrieving port flags from backend