Unregister

Removes a device record

Remove a device from the Meshblu device registry. In order to unregister a target device, your connection must be authenticated as a device that is in the target device's configure.update whitelist. See the Meshblu whitelist documentation for more information.

Event: "unregister", query, callback

  • query Query object, must contain only the uuid property.
    • uuid UUID of the device to unregister.
  • callback Function that will be called with a result.
    • result Response from the unregister call. Will contain either a uuid or an error, but never both.
      • uuid Uuid of the device that was unregistered
      • error String explaining the what went wrong. Is only present if something went wrong.

๐Ÿ“˜

No 404

In Meshblu, it is not possible to distinguish between a device not existing and not having permission to view a device. In most of the Meshblu API calls, the error in both cases yields the protocol-specific equivalent of an HTTP 404: Not Found. The Socket.IO API, however, returns the error Forbidden. This is for backwards compatibility and will likely change with the next major version release of the Socket.IO API.

Successful Response

When unregister is called for a device the authenticated device may modify:

{
  "uuid": "26de691f-8068-4cdc-907a-4cb5961a1aba"
}

Error Response

When unregister is called for a non-existing device, or device the authenticated device may modify:

{
  "error": "Forbidden"
}