Generally, we used two APIs for IoT communication APIs are:

1. Rest based communication APIs

restAPI

REST- based communication APIs constraints

A REST - full web service is a "Web API" implemented using HTTP and REST principles. REST is most popular IoT Communication APIs.

clientserver

HTTP methods:

Uniform Resource Identifier (URI)GETPUTPATCHPOSTDELETE
Collection, such as https://api.ex ample.com/reso urces/List URIs and perhaps other details of the collection's members.Replace the entire collection with another collection.Not generally used.Create new entry in the collection. The new entry's URI is assigned automatically and is usually returned by the operation.delete the entire collection.
Element, such as https://api.ex ample.com/reso urces/item5Retrieve a representation of the addressed member of the collection , expressed in an appropriate Internet media type.Replace the addressed member of the collection, or if it does not exist, create it.Update the addressed member of the collection.Not generally used. Treat the addressed member as a collection in its own right and create a new entry within it.Delete the addressed member of the collection.

​2. WebSocket-based Communication APIs

websocket

In this article we learned IoT communication APIs: REST (request-response) and WebSocket (bi-directional). Understand their principles, constraints, and suitability for IoT applications. Hope you gained some Knowledge!

Thank you for reading this Article!

You are a Great Learner !!