OData - Design your data resource for IoT [Internet of Things]
Until a few years before , the CRUD operation on data was only possible through applications and SOAP services. There was no way to operate on data directly from different producers and consumers.
In 2007 , Microsoft had taken the initiative to expose the data resource directly to web under OData protocol.
The protocol enables the creation and consumption of REST APIs, which allow resources, identified using URLs and defined in a data model, to be published and edited by Web clients using simple HTTP or HTTPS messages.
Each REST command is a POST, GET, PUT, PATCH, or DELETE HTTP request.
- GET: Get a collection of entities or a single entity.
- POST: Create a new entity.
- PUT: Update an existing entity.
- PATCH: Update an existing entity with a partial update.
- DELETE: Remove an entity.
The GET operation also supports a number of amazing features , like sorting, pagination, filtering, expanding entities.
OData provides full metadata of the data source. With a $metadata query it is possible to see the full structure of the data available from a given OData service, as well as data types and relationships.
The API response format could be xml or json.
OData also supports batch processing of the APIs, i.e. multiple different API calls will execute on server as a single request and deliver a consolidated response.
You could make your data communication secure by using transport layer security and message layer security. Open-Auth could be an automatic choice for introducing the message level security for REST based services.