Skip to Content
Industrial Internet Application Development
book

Industrial Internet Application Development

by Alena Traukina, Jayant Thomas, Prashant Tyagi, Veera Kishore Reddipalli
September 2018
Intermediate to advanced
412 pages
11h 12m
English
Packt Publishing
Content preview from Industrial Internet Application Development

Adding a new device

Adding the device should be by using the same /iiot/devices/ endpoint but, by using the HTTP POST method, we can add a new device to the list of devices, and, if it is successfully created, it should return an HTTP 201 Created status code. This can be seen in the following example:

HTTP POST --> /iiot/devices{      "name": "device-pump2",      "assetType": "pump",      "active": "yes"    } 

HTTP response will be as follows:

201 Created

In this case, the payload does not have the device-ID since it will be autogenerated by the service itself.

Once the device is added, we can actually get the details of the device using a nested URL with the ID by accessing the url/iiot/devices/11. It should return the device details only for that device. ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Industrial Internet of Things

Hands-On Industrial Internet of Things

Giacomo Veneri, Antonio Capasso
What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz

Publisher Resources

ISBN: 9781788298599Supplemental Content