Automated real-time machine learning for IOT for manufacturing a cloud architecture and API