on 2021 Mar 04 3:48 PM
Dear SAP IOT experts,
we would like to create capabilities on the fly and add properties to those capabilities as a device send more data.
Sadly the Device API does not allow it. There is a put method for capabilities but it only allows us to alter the name or alternateid.
I understand that removing properties would be bad. But what about adding new ones? Is this in any way possible?
If not is there any sorta work around where we could add more properies as we go? I know we could create more property sets but it would make mapping the incoming data more difficult.
Thanks in advance
David
Request clarification before answering.
... checking ...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Release Note: https://help.sap.com/viewer/a91b9b0c730241f99b6dd32fdc310a5b/Cloud/en-US/3ab34ec5a9ac4da5942a89a7ef3...
The PUT API for Capability will accept null properties, If the properties field is null then only the alternate id and the name is updated. If the properties field in the request has vales, these values should have all the existing properties in same order as when created and any additional properties at the end, if any. Failing to specify the exiting properties will result in a validation error with HTTP 400 and message as “Unable to update a capability. Existing properties do not match with the incoming properties.”
Valid message body Examples for put API:
1. With only name and alternate id
{
"alternateId": "sampleCapAltId",
"name": "capability1",
}2. With existing property:
{
"alternateId": "sampleCapAltId",
"name": "capability1",
"properties": [{
"name": "existingProerty",
"dataType": "integer",
"unitOfMeasure": "C",
"formatter": {
"dataType": "integer",
"scale": 0,
"shift": 0,
"swap": true
}
}]
}3. With Existing property and additional property:
{
"alternateId": "sampleCapAltId",
"name": "capability1",
"properties": [{
"name": "existingProerty",
"dataType": "integer",
"unitOfMeasure": "C",
"formatter": {
"dataType": "integer",
"scale": 0,
"shift": 0,
"swap": true
}
},{
"name": "newProperty",
"dataType": "integer",
"unitOfMeasure": "C",
"formatter": {
"dataType": "integer",
"scale": 0,
"shift": 0,
"swap": true
}
}]
}
Hope This helps!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, what is possible since last fall is that you have a capability with lots of properties and only send an (increasing) subset of it. Adding properties to an existing property set in the thing model (or the equipment model when using EPD or PAI) is possible today already. I learnt from product management colleagues is that "To make it possible to add a property for an existing capability" is under discussion for future development. I will update this question if this moves from "under discussion" to "planned". Regards, Marcus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marcus,
Do you have any new infos on this subject. We need the possibility to add properties to devices and we need these properites to run through the rules framework. Atm im considing creating properites as placeholder properties (ex. custom_prop1, custom_prop2 ) but its not really the ideal solution.... I would be greatful for any informatio.
Kind regards.
David
| User | Count |
|---|---|
| 12 | |
| 9 | |
| 8 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.