How to get navigation course data for building Elevation chart?

Some Edge devices (like Edge Explore) can create navigation courses, like navigate from current position to some POI/address etc.

I'd like to read such a generated course in a way that would allow to builld elevation chart (iterate through course points and get the subsequent elevation information). Additionally I'd need some kind of events generated upon course re-calculation so that I can refresh the chart when the course changes.

How can I obtain such information?