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.

I know this is late and you possibly found a solution (or gave up), but you can query both masters at v1/status?pretty=1 URI on the API and look for the following entry:

                "idomysqlconnection": {
                    "ido-mysql": {
                        "connected": true,
                        "instance_name": "default",
                        "query_queue_item_rate": 406.48333333333335,
                        "query_queue_items": 26,
                        "version": "1.14.3"

I think that since only one master can take over the IDO at a time, that this should work. We are working to introduce our second master, so I can’t test right now :frowning: