What is the technology that the cloud uses to communicate with the devices?

Is it Rest API calls or something else like websockets or some framework that uses websockets?