Get zone master, ha master and config master from api

Hello there,
After toying around with a couple of master in HA and IDO, i was hoping to monitor which server had the zone master role, the ha master role (for ha based features like ido), and the config master role.
Getting this information could come handy, but i can get it only from debug logs, i didn’t found a way to get it directly from API, any idea or things i could be missing ?

I’m refering to thoses in logs for example :

[2021-01-06 10:18:32 +0100] notice/ApiListener: Current zone master: master2.localdomain 
[2021-01-06 10:11:33 +0100] information/IdoMysqlConnection: Last update by endpoint 'master2.localdomain' was 64.0388s ago. Taking over 'ido-mysql' in HA zone 'master'.
[2021-01-06 10:10:37 +0100] information/ApiListener: Received configuration updates (8) from endpoint 'master2.localdomain' are different to production, triggering validation and reload.