I finally found out how to get the list of online endpoints. The only thing that worked for me is to switch to the modelmanagement api instead of the general management api documented by Microsoft at the Online Endpoints - List.
More details can be found here - Drill down into workspaces and their resources
The page discusses how you need to switch to specific modelmanagement api provided by a discoveryUrl.