Delete devices and things
The Bosch IoT Suite UI offers an easy way for registering and deleting your physical devices.
However, you can also use the Bosch IoT Suite - Device Provisioning API.
Table of contents:
How to execute
The API documentation for de-provisioning devices and things is provided at
https://apidocs.bosch-iot-suite.com/index.html?urls.primaryName=Bosch IoT Suite - Device Provisioning#/deprovisioning
In order to delete an entity you will need write permission for the thing.
At this point, we assume that the entities have been created via Device provisioning API. Thus, the authentication and authorization for deleting such an entity should happen for the same scope.
Authorize with your Suite OAuth token.
See Create a Suite Auth client.
Click Try it out.
Set the service-instance-id.
Set the device-id.
This is the same as the ID you have set at the time of provisioning it.
Pattern is your.namespace:your-device-name.
Additionally you will need to decide whether or not to keep other entries associated with it:
the device credentials at Bosch IoT Hub - keepCredentials - false
(or true if you want to hinder, that a new device with the same ID will ever re-register successfully).
the policy at Bosch IoT Things - keepPolicy - false
(or true if you have a policy that is used by several other things).
Click Execute to submit the request.
Upon success, you get the status code 200, with a response body similar to the following snippet:
"Device deleted successfully"
"Credentials deleted successfully"
"Thing deleted successfully"
"Policy deleted successfully"
Delete the device credentials separately
In case you have decided to keep the credentials, but want to delete them afterwards, use Bosch IoT Hub API, and authenticate with your Suite OAuth token.
Delete the policy separately
In case you have decided to keep the policy, but want to delete them afterwards, use Bosch IoT Things API, and authenticate with your Suite OAuth token.
Deleting a namespace - will automatically delete ALL things and policies which have been registered with that namespace.
Deleting a Things service instance - will automatically delete ALL things, policies, namespaces and connections implicitly.
Deleting a Hub instance - will automatically delete ALL devices, credentials and the tenant.
Deleting a Suite authentication client - will only delete the respective OAuth2 client and the application will no longer be able to use this client for authorization.