m2monem2m

UPDATE of nested attributes in a resource


There are many complex resources in oneM2M with nested attributes e.g. subscription, group etc.

If an UPDATE request is sent to update a nested attribute e.g. eventNotificationCriteria>missingData>number of subscription resource then all other existing eventNotificationCriteria (if present) should remain intact including duration in missingData and only number should be updated.

Is this how the nested attribute UPDATE should be handled?


Solution

  • This is correct. The CSE must take care only to update or create those attributes that are listed in the UPDATE request, and leave all others untouched.

    You may check TS-0004 "Service Layer Core Protocol Specification", section "7.3.3 Hosting CSE actions" and especially section "7.3.3.7 Update the resource":

    Attributes that are not included in the Content parameter of the addressed resource shall not be changed by the Hosting CSE.

    Please note, that when attributes of a resource are updated some (usually read-only) attributes that are managed by the CSE may be updated as well, e.g. the lastModifiedTime attribute. Also note, that even when an update value is the same as the value of the attribute, the update is performed nevertheless (including the update of the lastModifiedTime attribute).