You could use one of the various APIs posted by the above users, or find some maintained projects like
https://github.com/anselal/antminer-monitor/tree/master/config, nothing much has changed since in regards to Antminer API, it's Cgminer that people keep forking, you can either use WebSocket or SSH to control and retrieve various data from your miners, the newer models probably have updated some the things and thus it would require some work to figure out the new features if any.
With that being said, there is really no economic incentive in doing so, for monitoring your miners, there exists free software like BTC tools
https://github.com/Sanberstav/BTCToolsFor complete management (100% fully automated), there will be a lot of work involved, I would suggest using things like
https://www.awesomeminer.com/signup, the base cost is $2/miner a month, and it gets cheaper the more gears you add, if you have 100 gear you will pay $1.4 / month, to develop something remotely close to awesome miner you will spend many years and tens if not hundreds of thousands of dollars, trust me, been there done that, I have a great experience in programming, spent a few months during my free time playing with different gears, but then eventually when I used AM, I was like WTF was I even doing.
