Things resources

An IoT developer can create, read, update and delete Things via the Bosch IoT Things HTTP API.

{
"thingId": "the.namespace:theId",
 "attributes": {},
 "features": {
    "featureId-0-to-n": {
        "properties": {
            "connected": true,
            "complexProperty": {
                "street": "my street",
                "house no": 42
            }
        }
    }
 }
}

The root resource contains information about which version is currently deployed.

 https://<host>/api/2/things

For Policy see Policies resources.

Note on Thing ID

Due to the fact that a Thing ID often needs to be set in the path of a HTTP request, we have restricted the set of allowed characters for it. Please find the details in the Ditto documentation on namespaced entity IDs.
For a POST request this restriction will apply automatically, as our service will generate the ID.
For a PUT request containing for example an / character in the ID you will get the HTTP status code 400 with following message:

{
  "status": 400,
  "error": "thing.id.invalid",
  "message": "The ID 'com.acme:coffee/maker' is not valid!",
  "description": "It must conform to the namespaced entity ID notation (see Ditto documentation)",
  "url": "https://www.eclipse.org/ditto/basic-namespaces-and-names.html#namespaced-id"
}

Note on Feature ID

Due to the fact that a Feature ID often needs to be set in the path of a HTTP request, we strongly recommend to use a restricted the set of characters (e.g. those for Uniform Resource Identifiers (URI) see http://www.ietf.org/rfc/rfc2396.txt ).

Note on Attribute and Property Keys

We strongly recommend to use a restricted the set of characters for the keys (identifier) of Thing Attributes and Feature Properties. Currently these identifiers should follow the pattern: [_a-zA-Z][_a-zA-Z0-9\-]*

Note on special fields

Apart of all fields of a Thing which can be set explicitly at Thing creation or modification, a Thing holds additional information which might be of interest.

  • _namespace
    The field value is the namespace encountered as a prefix of the Thing ID.
  • _modified
    The field value represent the latest modification of the Thing. The timestamp - in ISO-8601 UTC format - is set on each modification of a Thing.
  • _revision
    The field value represent how often the Thing was modified. This counter is incremented on each modification of a Thing.
  • _policy
    The field value represent the policy for the Thing. Find the concept at Policies.

Note on Conditional Requests