APIs Device to Cloud One M2 M FlexContainer

A flexContainer (resourceType = 28) represents a customizable container for data instances that can be extended with so-called custom attributes. For this, a flexContainer is a template and is never directly created but only as a specialization of it. This is a similar concept as the mgmtObj resource that is also not directly instantiated. This is a similar concept as “inheritance by extending” in programming.

flexContainer specializations need to be separately defined. They may have their own set of custom attributes and/or child resources.

All specializations have the same resource type (ty) attribute set to 28, but are distinguished by an entry in the containerDefinition (cnd) attribute. See oneM2M Data Dictionary for examples.

This specification of the flexContainer resource adds a draft extension, namely the support for flexContainerInstance resources. This means that this specification might change in the future.

Supported child resources

Child Resources TypeMultiplicityDescription
flexContainer0..nA flexContainer represents a customizable container for data instances that can be extended with so-called custom attributes.

Universal and common attributes

NameFull NameTypeMultiplicityMode
tyresourceTypem2m:resourceType / integer1RO
riresourceIDm2m:ID / string1RO
rnresourceNamestring1WO
piparentIDm2m:ID / string1RO
lbllabelsm2m:labels / list of string0..1(L)RW
acpiaccessControlPolicyIDsm2m:acpType / list of resourceID0..1(L)RW
ctcreationTimem2m:timestamp1RO
ltlastModifiedTimem2m:timestamp1RO
stateTag1RW
announcedAttribute0..1(L)RW
announceSyncType0..1RW
holder0..1RW
stateTag1RO

Mode: RW = Read/Write, RO = Read Only, WO = Write Once

Resource specific attributes

NameFull NameMultiplicityModeCreateUpdate
cndcontainerDefinition1WOMNP
cscontentSize0..1RWOO
nlnodeLink0..1RWOO
customAttribute0..nRWOO

Mode: RW = Read/Write, RO = Read Only, WO = Write Once

Request Optionality: NP = not provisioned, O = optional, M = Mandatory

Attribute: cnd (containerDefinition)

This attribute contains an identifier reference (URI) to the flexContainer schema definition which shall be used by the CSE to validate the syntax of the flexContainer resource. This URI may refer to one of the oneM2M flexContainer definitions specified in one of oneM2M’s specifications, but can also be a proprietary definitions.

Attribute: cs (contentSize)

Sum of the size in bytes of all of the custom attributes.

** Attribute: nl (nodeLink)**

The resource identifier of a node resource that stores the node specific information of the NoDN on which the interworked service represented by this flexContainer resource resides.

Attribute: customAttribute

One or more specialization-specific attribute(s). Name and data type defined in each specialization of flexContainer resource.

FlexContainer “nodeProvisioningRequest”

This nodeProvisioningRequest (dtiot:noPRt) resource type is a specialization of flexContainer, and it is located under an container resource. It represents a request containing a list of nodes to be provisioned in IoT Hub, enabling the respective devices to communicate with the IoT Hub afterwards. The requests will be processed by a device provisioning AE, that integrates with the underlying device communication layer to provision there the appropriate device information.

Custom Attributes:

NameFull NameTypeMultiplicityMode
opernoperationdtiot:enumNodeProvisioningOperation1RW
reqLtrequestListlist of dtiot:nodeProvisioningData1RW

Attribute: opern (operation)

Identifies the provisioning operation to be applied:

  • 1= provision
  • 2= remove

Attribute: reqLt (requestList)

The list of devices for which the provisioning operation will be applied, including the required information depending of the operation |

Attribute type: dtiot:nodeProvisioningData

NameFull NameTypeMultiplicityMode
ninodeIDxs:string1RW
noRNenodeResourceNamexs:string0..1RW
ICCIDICCIDxs:string0..1RW
profeprofilexs:string0..1RW

Attribute: ni (nodeID)

This is the main identifier of the node to be provisioned and it will be used as the nodeID of the node that will be created as part of the provisioning processing. Thus the value shall be a valid nodeID string in one of the following formats: urn:gsma:imei:<imei> or urn:x-dtiot:dev:sn:<string with the serial number from device>

Attribute: noRNe (nodeResourceName)

Name of the node resource that will be created for the device. Used only if the operation is provision.

Attribute: ICCID

ICCID of the SIM Card that will be used by the device. Used only if the operation is provision and even in this case that is an optional attribute.

Attribute: profe (profile)

The profile of the device to be provisionied. It shall be one of

  • SCS-UDP
  • SCS-lwM2M
  • SCS-MQTT

Used only if the operation is provision

Example JSON:

The following is an example JSON encoding of a flexContainer that stores the device provisioning requests. The first part are the common and universal attributes if the resource, and at the end it the actual payload data (aka “custom attributes” of the flexContainer).

{
    "dtiot:noPRt": {
        "cnd": "com.telekom.iot.orchestrator.nodeProvisioningRequest",
        "cr": "A-Customer-Management-AE",
        "cs": 16,
        "ct": "20200313T141200,890746",
        "lt": "20200313T141200,890746",
        "pi": "5e7ded3794abce201c0029f9",
        "ri": "890990770660",
        "rn": "myProvisioningRequest",
        "st": 0,
        "ty": 28,
 
        "operation": 1,
        "requestList": [
            {
                "nodeID" : "urn:gsma:imei:35193454678897",
                "nodeResourceName" : "device001",
                "ICCID" : "89882280000004495285",
                "profile" : "SCS-lwM2M"
            },
            {
                "nodeID" : "urn:gsma:imei:35193454679876",
                "nodeResourceName" : "device002",
                "profile" : "SCS-UDP"
            },
            {
                "nodeID" : "urn:gsma:imei:35193454673391",
                "nodeResourceName" : "device003",
                "ICCID" : "89882280000004495345",
                "profile" : "SCS-lwM2M"
            }
            // D2C request proposal
            ,{
                "nodeID" : "urn:gsma:imei:35193454673391",
                "nodeResourceName" : "device003",
                "lbl" : [ "profile:SCS-lwM2M", "ICCID:89882280000004495345", ... ],
                "credentials": [ "psk-id:...", "psk:....", "cert:...", ... ], // option 1
                "credentials": "<base64string>", // option 2
            }
        ],
    }
}

FlexContainer “provisioningRequestResponse”

This resource type (dtiot:prRRe) is a specialization of flexContainer, and it is located under an container resource. It represents a response to a request containing a list of devices to be provisioned in IoT Hub, enabling their communication afterwards. A device provisioning AE, that processes device provisioning requests shall create resources of this specialization to indicate the results of the provisioning processing.

NameFull NameTypeMultiplicityMode
reqRDrequestResourceIDxs:string1RW
resSsresponseStatusdtiot:enumNodeProvisioningResponseStatus1RW
geEMegeneralErrorMessagexs:string0..1RW
inEMsindividualErrorMessageslist of dtiot:provisioningErrorMessage0..1RW

Attribute: reqRD (requestResourceID)

The resourceID of the request, whose results are contained in the resource. Since the original request is deleted after it is processed it won’t be possible to use this attribute to retrieve the original request. That means the requestor shall keep the resourceID of the created request and use it as a correlation ID to identify the respective response.

Attribute: resSs (responseStatus)

Final processing status of the provisioning request.

Attribute: geEMe (generalErrorMessage)

Error message regarding the processing of the whole request. Only present when responseStatus is completedWithErrors or rejected.

Attribute: inEMs (individualErrorMessages)

Error message for each individual device not successfully processed. Only present if there is any error message.

Attribute Type: dtiot:enumNodeProvisioningResponseStatus

  • 1 = completed
  • 2 = completedWithErrors
  • 3 = rejected

Attribute Type: dtiot:provisioningErrorMessage

NameFull NameTypeMultiplicityMode
nodIDnodeIDxs:string1RW
errMeerrorMessagexs:string1RW

Attribute: nodeID

This is the main identifier of the device that should have been provisioned

Attribute: errorMessage

Description of the error occurred in the processing of the provisioning of that device

JSON representation example:

The following is an example JSON encoding of a flexContainer that stores the device provisioning requests. The first part are the common and universal attributes if the resource, and at the end it the actual payload data (aka “custom attributes” of the flexContainer).

{
    "dtiot:prRRe": {
        "cnd": "com.telekom.iot.orchestrator.provisioningRequestResponse",
        "cr": "deviceProvisioning-AE",
        "cs": 16,
        "ct": "20200313T141200,890746",
        "lt": "20200313T141200,890746",
        "pi": "5e7ded3794abce201c0029f9",
        "ri": "61eac0cf71ad087179702f7b",
        "rn": "responseToRequest-61ba162b1543fc25abe8acea",
        "st": 0,
        "ty": 28,
 
        "requestResourceID": "61ba162b1543fc25abe8acea",
        "responseStatus" : 2,
        "generalErrorMessage" : "Total to be provisioned: 100; Successfully processed: 98; Errors: 2"
        "individualErrorMessages": [
            {
                "nodeID" : "urn:gsma:imei:35193454678897",
                "errorMessage" : "device profile not supported"
            },
            {
                "nodeID" : "urn:gsma:imei:35193454679876",
                "errorMessage" : "device with same nodeID already exists"
            },
        ],
    }
}

FlexContainer “DeviceGroup”

NameFull NameTypeMultiplicityMode
nodesnodesarray(String)0..1(L)RW
applicationEntitiesapplicationEntitiesarray(String)0..1(L)RW

Attribute: nodes

List of nodes .

Attribute: applicationEntities

List of application entities AE .