Bosch IoT Device Management - will be discontinued by mid 2024

Register a device via the Device Provisioning API and using an Eclipse Vorto model

In this example, we assume the thing you create has been modeled already with Eclipse Vorto and is available in the Vorto GitHub repository or a private Vorto repository.

For provisioning a thing with a structure based on an Eclipse Vorto information model you will need to set the definition in the request body.

Your entry point into our interactive API documentation is Bosch IoT Suite - Device Provisioning.

Provisioning request

  1. Authorize with a JWT (e.g. Create a Suite Auth client)

  2. Use the provisioning resource.
    POST /{service-instance-id}/devices

  3. Click Try it out to get all entry fields editable.

  4. Set the service-instance-id.
    If you have not stored your credentials at the end of the step Getting started with a simple device,
    open the Bosch IoT Suite UI>Subscriptions (Beta) and select your relevant subscription from the list. In the details view on the right, copy the value of your Instance ID and switch back to the API docs to enter it in the respective field.

  5. Set the authScope to deviceManagementSubscription.

  6. Set the definitionResolver to "vorto".

  7. Edit the content for the request body.

    1. The ID is composed of yournamspace and the device name, separated by a colon : character.

    2. The definition pattern is namespace:name:version
      Let us assume you want to provision a new device based on a model which is already available in the Eclipse Vorto GitHub repository,
      e.g. https://github.com/eclipse/vorto/tree/development/models/com.bosch.iot.suite.example-VirtualDemoDevice-2.0.0.infomodel → the definition notation would be com.bosch.iot.suite.example:VirtualDemoDevice:2.0.0.

      In case you want to provision a device based on a model which is available in a private Vorto repository please first configure your access to the private Vorto repository.

      Example request body

      {
      "id": "my.demo.namespace:my-device-4711",
      "hub": {
      "device": {
      "enabled": true
      },
      "credentials": {
      "type": "hashed-password",
      "secrets": [
      {
      "password": "yourPassword"
      }
      ]
      }
      },
      "things": {
      "thing": {
      "definition": "com.bosch.iot.suite.example:VirtualDemoDevice:2.0.0",
      "attributes": {
      "manufacturer": "Robert Bosch GmbH"
      }
      }
      }
      }
  8. Click Execute to submit the request.

  9. Verify that the request was successful Code 201.

Response

You can download the result as JSON for further requests.




In case your device should be provisioned without any Vorto definition, omit specifying a definitionResolver.


Check your work

Navigate to /Things/get_things

Set the thing ID my.demo.namespace:my-device-4711

The response should show the structure created.