Configuration: OData Service
Configuration-related services
Overview
You can use this service to configure individual objects such as package, thing type, property set type, and annotation in SAP IoT platform. Hence, the service allows you to update the individual objects simultaneously within the same package. You need not maintain the version of all individual objects, instead the system generates and maintains version of the objects. Only the latest version of the objects is active for updates.
OData Version: 2.0
Entity Data Model
The following diagram shows the EDM of the configuration package:
Here is a short overview of what the objects shown in the diagram represent and how they are related:
- All objects which, in their entirety, make up the thing model of SAP IoT, are assigned to a Package. The package serves as a container for all objects that are set up to serve a particular business purpose, for example, all kinds of objects that you need to model the digital twin of a car or a coffee machine. The package also serves as a virtual data space where all objects defined in the package are visible and can be accessed by each other.
- During thing modeling, you typically start by identifying the general aspects of a particular group of mostly identical things in the real world (coffee machine type "CM 3000", car type "Volkswagen Beetle"). These common aspects are reflected by a Thing Type.
- A thing type alone is not much more than an empty bucket with a small set of attributes, such as a name and ID. To actually describe what is specific of a particular thing type, you set up so-called Property Set Types from which you then derive a Property Set that you can assign to one or many thing types. As the name suggests, a property set type is an object used for bundling a set of individual properties that belong together (for example, the fill level and the temperature of a milk tank found in a coffee machine or rotation speed of a car wheel).
- Typically, each Property that is part of a property set type corresponds to a measured value that is recorded by a sensor mounted to a physical device. However, properties can also represent basic data of a thing that is stable over time (for example, name, color, serial number) or derived data that is calculated on the basis of measured data (for example, average temperature within a given time frame).
- The technical details of each property (such as maximum string length or number of decimals) are stored in an object called Property Type. Each property refers to exactly one property type, while a package can contain any number of property types.
- Under real-world conditions, you will often feel the need to instantiate numerous variants of things that have most of their properties in common but vary in certain aspects. For example, as a producer of coffee machines, you may have different product lines with the same customer-facing features, but different tank volumes or compression unit pressure limits. For the purpose of reflecting such similar, but not identical products, you may take advantage of using Thing Templates. The thing template is derived from a thing type just like any other thing. However, you then define the common parts of things to be created in the thing template. Once done, you use the template for creating copies of the template as things. Each thing based on the template automatically inherits all settings that are present in the template, while the varying parts can be defined individually per thing.
- Sometimes, you may want to qualify certain properties found in a property set. You can accomplish this by associating a property with an Annotation. The most common use case for that may be to highlight certain properties as sensitive data or private data. Such qualification may be legally required by applicable law like the General Data Protection Regulation (GDPR), which is in effect in the European Union.
- Collecting sensor data for things is not a purpose in itself. Rather, you may feel the need to relate thing data with business-specific entities that you maintain in your ERP system, such as customer, supplier, sales order, storage location, and so on. To accomplish this, you can establish an Association between a thing type and a business object to which it is related.
- Each single real-world instance of the things mirrored by a thing type has its virtual equivalent in an object called Thing (for example, the particular coffee machine of type CM 3000 with the unique serial number 987987945 that is installed in the coffee corner in the second floor of your company's main building).
- Each type of object can be semantically specified with a Description in natural language. Although it is good practice to provide such descriptions, it is technically not required and can therefore be omitted.
Service Metadata URI for package: http://<server address>[:<port number>]/Package/v1/$metadata
Service Metadata URI for thing configuration: http://<server address>[:<port number>]/ThingConfiguration/v1/$metadata
Resources
| Resource | Description | Path |
|---|---|---|
| Package Configuration | Package | /v1/Packages |
| Thing Type | Thing Type | /v1/ThingTypes |
| Thing Template | Thing Template | /v1/ThingTemplates |
| Property Set Type | Property Set Type | /v1/PropertySetTypes |
| Property Type | Property Type | /v1/PropertyTypes |
| Annotation | Annotation | /v1/Annotations |
| Event Configuration | Event | /v1/EventTypes |