You can use below API that will show In Service for the UCCX server that is currently running as Master and Out of Service for the one that will be running as slave. In case, you don't get any reply that means server is down completely
https://<IP Address of CCX Server>:8445/finesse/api/SystemInfo
Regards
Deepak