If we want to delete a device, essentially we use HTTP DELETE to delete that instance of the device. The response we should get is HTTP 204 No Content, which says that the request has been processed but does not have any content to return.
In the following example, we are deleting a device with the ID 11:
HTTP DELETE --> /iiot/devices/11
HTTP response will be as follows:
204 No Content
The message HTTP 500 Internal Server Error is returned if there is anything wrong with the request. It can be returned for any of the HTTP requests which represent an internal error in the server; these could include any issues, such as an error with servicing the requests.