Device to Cloud Command Line Interface DMO Commands
Overview
Device to Cloud (D2C) is implemented on top of the T IoT Hub’s Device Management Orchastration (DMO) layer. Out of this reason d2c provides some commands to access DMO API from the command line.DMO API implements the API model from oneM2M
. To get an understanding how uses the DMO model and by this the oneM2M model I recommand to read the Key Concepts of Device to Cloud
.
Available Commands
| Command | Short | Description |
|---|---|---|
| get-resources | gr | Returns a single or a list of oneM2M resource objects. |
| add-resource | ar | Adds a new oneM2M resource object. |
| update-resource | mr | Updates an existing oneM2M resource object. |
| delete-resource | dr | Deletes a oneM2M resource object. |
d2c you need to configure a DMO access profile and activate it (see Manage DMO access profiles
). Without an active DMO access profile d2c cannot access DMO.get-resources
- Description
- Options
- Global Options
- Samples
With the command d2c get-resources you can query single and multiple resource objects from DMO.
d2c get-resources [--select <select fields> | -s <select fields>]
[--format <CSV | JSON> | -f <CSV | JSON>]
[--separator-char <char> | -sc <char>]
[--resource-name <string> | -rn <string>]
[--resource-id <string> | -ri <string>]
[--resource-type <rt> | -rt <rt>]
[--result-content-indicator <rci> | -rci <rci>]
[--limit <int> | -li <int>]
[--offset <int> | -os <int>]
[--profile-file <file> | -p <file>]
[--origin <string> | -o <string>]
[--help | -h]
[--debug]
[--info]
[--outfile <filepath>]
[--config-directory <directory>]
[--config-file <file>]
--select <select fields>, -s <select fields>
A comma seperated list of element names which shall be selected from the returned resource objects and written to stdout as CSV or JSON format. To control if the output is written in CSV or JSON format use the –format option. The elements which you can be selected depends on the type of resource objects you query. To understand which fields are available to select you can run d2c get-resources without –select option to see which fields are part of the queried resource type or you can read the documentation Key Concepts of Device to Cloud
.--format <CSV | JSON>, -f <CSV | JSON>
With the –format option you can control in which format the queried resource objects shall be written to stdout. If you don’t define any select fields with –select option the default format is JSON. If you define select fields with –select option the default format is CSV.--separator-char <char>
If the –select option is used the selected elements are written to the stdout as CSV. With –separator-char you can control which character shall be used to seperate the different fields from each other in the output. By default ; is used as separator character.--resource-name <string>, -rn <string>
With the –resource-name option you can define the name of the resource object which attributes and child objects you like to query. You can not only specify the names of individual top-level resources such as of application entities or nodes, you can also define entire paths along the object hierarchy such as device-communication/0004A30B0102F728/sent-msg.--resource-id <string>, -ri <string>
To get the content of a resource object you can addresse it by using the –resource-name option but also you can address the object directly by it’s id with the –resource-id option.--resource-type <rt>, -rt <rt>
To get not only a single object with its attributes and its child objects you can also get mulitple resource objects of a specific type as a list such as all application entities, nodes, etc.. To do so you can use the –resource-type option in its short or long form to specifiy the type of the resources you like to get (the id of the resource type is currently not supported). Following types are currently supported:
| Resource type | Short | Id (not supported) |
|---|---|---|
| application-entity | ae | 2 |
| container | cnt | 3 |
| content-instance | cin | 4 |
| group | grp | 9 |
| managed-object | mob | 13 |
| node | nod | 14 |
| subscription | sub | 23 |
| flex-container | fcn | 28 |
--result-content-indicator <rci>, -rci <rci>
With the option –result-content-indicator you can control the amount of content which is returned as a result. The following indicators can be used:
| Result content indicator | Short |
|---|---|
| return-nothing | rn |
| return-all | ra |
| return-modified | rm |
| attributes | a |
| attributes-and-children | ac |
| children | c |
--limit <int>, -li <int>
To controll the number of resource objects in the result you can use the option –limit. With the –limit option in combination with the –offset option, you can implement a pagination process to walk through large amounts of resource objects.--offset <int>, -offset <int>
With the –offset option you can define the index or offset of the first resource object in the response. Normally you use the –offset option together with the –limit option to implement a pagination process.--profile-file <file>, -p <file>
DMO access profile file which shall be used instead of the current activated on in the d2c configuration.--origin <string>, -o <string>
Each request to the DMO API requires the HTTP header field X-M2M-ORIGIN. With the option –origin you can overwrite the default value of d2ccli. By convension oneM2M requires that the X-M2M-ORIGIN value is prefixed with a C character. This is done automatically by d2c, so please define the origin without the leading C.
--help, -hDisplays the help for this command.
--infoTurn on info logging.
--debugTurn on debug logging.
--outfile <file>File into which the info or debug outputs shall be written additionaly.
--config-directory <directory>Path to the directory within which the file config.json can be found. By default this directory is
$HOME/.d2c.--config-file <file>Path to the configuration file. By default this path is
$HOME/.d2c/config.json.d2c get-resources --resource-type application-entity
[
{
"api": "NNI-IPE-App",
"rn": "NI-IPE",
"ty": 2,
"ri": "67d8587dd7ca00dc06b063b3",
"aei": "CNI-IPE",
"pi": "d2c-dev-1",
"ct": "20250317T171437,165000",
"lt": "20250317T171437,165000"
},
{
"api": "Nd2ccli",
"rn": "d2ccli",
"lbl": [
"type:d2c"
],
"poa": [],
"ty": 2,
"ri": "67f8c99fbbad596bd9144867",
"aei": "Cd2ccli",
"pi": "d2c-dev-1",
"ct": "20250411T074951,863000",
"lt": "20250411T074951,863000"
},
{
"api": "NSCS-PRD-message-monitor",
"rn": "SCS-PRD-message-monitor",
"lbl": [
"type:d2c"
],
"poa": [
"https://api.scs.iot.telekom.com/message-monitor"
],
"ty": 2,
"ri": "680e859a0e2e928f3631dabd",
"aei": "CSCS-PRD-message-monitor",
"pi": "d2c-dev-1",
"ct": "20250427T192930,603000",
"lt": "20250427T192930,603000"
}
]
d2c get-resources --resource-type application-entity --select rn,ri --format CSV
NI-IPE;67d8587dd7ca00dc06b063b3
d2ccli;67f8c99fbbad596bd9144867
SCS-PRD-message-monitor;680e859a0e2e928f3631dabd
d2c get-resources --resource-type node --limit 10 --offset 0 --select rn,lbl
0004A30B0102DA13;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102DA6F;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102DC1C;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102DC2A;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102DF91;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102E4F2;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102EB01;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102EE9F;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102EEB4;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
0004A30B0102F728;['UplinkProperty_deviceType:SDI People Counter', 'scsTenant:DTAG-04', 'profile:SCS-lwM2M', 'ICCID:282828282828']
d2c get-resources --resource-name 0004A30B0102DC2A
{
"ni": "urn:gsma:imei:0004A30B0102DC2A",
"lbl": [
"UplinkProperty_deviceType:SDI People Counter",
"scsTenant:DTAG-04",
"profile:SCS-lwM2M",
"ICCID:282828282828"
],
"rn": "0004A30B0102DC2A",
"ty": 14,
"ri": "680e7c7283dba99abdafd894",
"pi": "d2c-dev-1",
"ct": "20250427T185026,051000",
"lt": "20250427T185026,051000",
"m2m:crds": [
{
"dc": "cred",
"mgd": 1029,
"rn": "credentials",
"ty": 13,
"ri": "680e7c7283dba99abdafd8a0",
"pi": "680e7c7283dba99abdafd894",
"ct": "20250427T185026,424000",
"lt": "20250427T185026,424000",
"crid": "0004A30B0102DC2A",
"crse": "UNDEFINED"
}
],
"m2m:sub": [
{
"rn": "device-update-subscription",
"nct": 1,
"enc": {
"net": [
1,
2,
3,
4
]
},
"nu": [
"http://d2c-device-provisioning.d2c.svc.cluster.local/provisioning/node"
],
"su": "http://d2c-device-provisioning.d2c.svc.cluster.local:80/provisioning/node",
"ty": 23,
"ri": "680e7c7283dba99abdafd89c",
"pi": "680e7c7283dba99abdafd894",
"ct": "20250427T185026,307000",
"lt": "20250427T185026,307000"
}
],
"m2m:dvi": [
{
"rn": "device-info",
"mgd": 1007,
"loc": "geo:25.245470,51.454009",
"dty": "Pretty Device",
"dlb": "this is a label",
"dvnm": "rba-dev-20250404-t002-1",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"ptl": [
"LWM2M"
],
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE",
"ty": 13,
"ri": "67efbe8f9b1f20af72d58d5c",
"pi": "67efbe8b4133d058ed933c91",
"ct": "20250404T111215,488000",
"lt": "20250404T111215,488000"
}
]
}
d2c get-resources --resource-name 0004A30B0102DC2A/device-info
{
"rn": "device-info",
"mgd": 1007,
"loc": "geo:25.245470,51.454009",
"dty": "Pretty Device",
"dlb": "this is a label",
"dvnm": "rba-dev-20250404-t002-1",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"ptl": [
"LWM2M"
],
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE",
"ty": 13,
"ri": "67efbe8f9b1f20af72d58d5c",
"pi": "67efbe8b4133d058ed933c91",
"ct": "20250404T111215,488000",
"lt": "20250404T111215,488000"
}
d2c get-resources --resource-id 67efbe8f9b1f20af72d58d5c
{
"rn": "device-info",
"mgd": 1007,
"loc": "geo:25.245470,51.454009",
"dty": "Pretty Device",
"dlb": "this is a label",
"dvnm": "rba-dev-20250404-t002-1",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"ptl": [
"LWM2M"
],
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE",
"ty": 13,
"ri": "67efbe8f9b1f20af72d58d5c",
"pi": "67efbe8b4133d058ed933c91",
"ct": "20250404T111215,488000",
"lt": "20250404T111215,488000"
}
add-resource
- Description
- Options
- Global Options
- Samples
With the command d2c add-resource you can create new resource objects in DMO from JSON on the command line or from JSON in a file.
d2c add-resource --resource-type <rt> | -rt <rt>
--resource-name <string> | -rn <string>
[--body <JSON> | -b <JSON>]
[--body-file <file> | -bf <file>]
[--profile-file <file> | -p <file>]
[--origin <string> | -o <string>]
[--help | -h]
[--debug]
[--info]
[--outfile <filepath>]
[--config-directory <directory>]
[--config-file <file>]
--resource-type <rt>, -rt <rt>
With the required option –resource-type you define the type of the resource object to create. You can use the resource type identifier in it’s long or short form (the resource type id is currently not supported). Following types are currently supported:
| Resource type | Short | Id (not supported) |
|---|---|---|
| application-entity | ae | 2 |
| container | cnt | 3 |
| content-instance | cin | 4 |
| group | grp | 9 |
| managed-object | mob | 13 |
| node | nod | 14 |
| subscription | sub | 23 |
| flex-container | fcn | 28 |
--resource-name <string>, -rn <string>
In case the new resource object shall be a child object of an existing resource object you can identify the existing one by its name with the –resource-name option. For excample if you want to add an content-instance object as an uplink inbound message to the communication container of an device you can identify the container to which the new uplink message shall be added with --resource-name `device-communication/0004A30B0102F728/received-msg.--body <JSON>, -b <JSON>
To initialize the attributes of the new resource object you can add a JSON body with the option –body to the command line. Alternatively you can use the option –body-file to use the JSON body from a file.--body-file <json-file>, -bf <json-file>
To initialize the attributes of the new resource object you can place the JSON body in a file and let the d2c add-resource command know about this with the –body-file option. Alternatively you can use the option –body to define the JSON body directly on the command line.--profile-file <file>, -p <file>
DMO access profile file which shall be used instead of the current activated on in the d2c configuration.--origin <string>, -o <string>
Each request to the DMO API requires the HTTP header field X-M2M-ORIGIN. With the option –origin you can overwrite the default value of d2ccli. By convension oneM2M requires that the X-M2M-ORIGIN value is prefixed with a C character. This is done automatically by d2c, so please define the origin without the leading C.
--help, -hDisplays the help for this command.
--infoTurn on info logging.
--debugTurn on debug logging.
--outfile <file>File into which the info or debug outputs shall be written additionaly.
--config-directory <directory>Path to the directory within which the file config.json can be found. By default this directory is
$HOME/.d2c.--config-file <file>Path to the configuration file. By default this path is
$HOME/.d2c/config.json.d2c add-resource --resource-type application-entity --body '{
"m2m:ae": {
"api": "NMy-Message-Monitoring-Endpoint",
"rn": "My-Message-Monitoring-Endpoint",
"lbl": [
"type:d2c",
"applicationType:WebHook"
],
"poa": [
"https://api.scs.iot.telekom.com/message-monitor"
]
}
}'
{
"m2m:ae": {
"api": "NMy-Message-Monitoring-Endpoint",
"rn": "My-Message-Monitoring-Endpoint",
"lbl": [
"type:d2c",
"applicationType:WebHook"
],
"poa": [
"https://api.scs.iot.telekom.com/message-monitor"
],
"ty": 2,
"ri": "6823098db1c2e64b8b59bee3",
"aei": "CMy-Message-Monitoring-Endpoint",
"pi": "d2c-dev-1",
"ct": "20250513T085749,056000",
"lt": "20250513T085749,056000"
}
}
{
"dtiot:noPRt": {
"cnd": "com.telekom.iot.orchestrator.nodeProvisioningRequest",
"rn": "device_provisioning_request_20250513-110957-01",
"operation": 1,
"requestList": [
{
"nodeID": "urn:gsma:imei:mydevice-001",
"nodeResourceName": "mydevice-001",
"ICCID": "89374121317959919924",
"profile": "SCS-lwM2M",
"nodeCredentials": [
"psk-id:mydevice-001",
"psk:Q3hhc21FTUw3NFNiUlIzUw=="
],
"ndvi": {
"rn": "device-info",
"mgd": 1007,
"dty": "Pretty Device",
"loc": "geo:25.245470,51.454009",
"dlb": "this is a label",
"dc": "This is the description of my device",
"dvnm": "This is the name of my device",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE"
},
"labels": [
"UplinkProperty_address:Kuckhoffstr 114A, 13156 Berlin",
"lastMaintenance:25.3.2025 1300"
]
}
]
}
}
d2c add-resource --resource-type flex-container --resource-name device-provisioning/request --body-file device-provisioning-request.json
{
"dtiot:noPRt": {
"cnd": "com.telekom.iot.orchestrator.nodeProvisioningRequest",
"rn": "device_provisioning_request_20250513-110957-01",
"opern": 1,
"reqLt": [
{
"ni": "urn:gsma:imei:mydevice-001",
"noRNe": "mydevice-001",
"ICCID": "89374121317959919924",
"profe": "SCS-lwM2M",
"ndvi": {
"rn": "device-info",
"mgd": 1007,
"dty": "Pretty Device",
"loc": "geo:25.245470,51.454009",
"dlb": "this is a label",
"dc": "This is the description of my device",
"dvnm": "This is the name of my device",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE"
},
"lbl": [
"UplinkProperty_address:Kuckhoffstr 114A, 13156 Berlin",
"lastMaintenance:25.3.2025 1300"
],
"nCr": [
"psk-id:mydevice-001",
"psk:Q3hhc21FTUw3NFNiUlIzUw=="
]
}
],
"ty": 28,
"cr": "Cd2ccli",
"st": 0,
"ri": "68230dc8025d7c9b131fff2e",
"pi": "67126d9a5543e7702245ef3f",
"ct": "20250513T091552,745000",
"lt": "20250513T091552,745000"
}
}
d2c add-resource \
--resource-type content-instance \
--resource-name device-communication/mydevice-001/received-msg \
--body '{
"m2m:cin": {
"rn": "c4cc8e09-599a-402a-9be8-c2be626852ab",
"con": "323832393238383932380A",
"cnf": "text/plain:0"
}
}'
{
"m2m:cin": {
"rn": "c4cc8e09-599a-402a-9be8-c2be626852ab",
"con": "323832393238383932380A",
"cnf": "text/plain:0",
"ty": 4,
"cs": 19,
"st": 2,
"cr": "Cd2ccli",
"ri": "68232fce6526c03fdd156242",
"pi": "67f62607ae6bcf79d8e3f7ab",
"ct": "20250513T114102,161000",
"lt": "20250513T114102,161000"
}
}
update-resource
- Description
- Options
- Global Options
- Samples
With the command d2c update-resource you can update an existing resource object by its name or id in DMO from JSON on the command line or from a JSON file.
d2c update-resource --resource-name <string> | -rn <string>
--resource-id <string> | -ri <string>
[--body <JSON> | -b <JSON>]
[--body-file <file> | -bf <file>]
[--profile-file <file> | -p <file>]
[--origin <string> | -o <string>]
[--help | -h]
[--debug]
[--info]
[--outfile <filepath>]
[--config-directory <directory>]
[--config-file <file>]
--resource-name <string>, -rn <string>To identify the object to update by its name you can use the –resource-name option. In case you like to update a child object you can also use its complete name-path. For excample if you want to update the device-info object of a device node object you can identify the device-info object by
--resource-name 0004A30B0102F728/device-info.Alternatively you can identify the object by its id with the –resource-id option.
--resource-name <string>, -rn <string>To identify the object to update by its id you can use the –resource-id option. Alternatively you can identify the object by its name with the –resource-name option.
--body <JSON>, -b <JSON>The JSON body which describes the attributes to update can be passed into the
d2c update-resource command with –body option. Alternatively you can use the option –body-file to use the JSON body from a file.--body-file <json-file>, -bf <json-file>To update the attributes of the object you can place the JSON body in a file and let the
d2c update-resource command know about this with the –body-file option. Alternatively you can use the option –body to define the JSON body directly on the command line.--profile-file <file>, -p <file>DMO access profile file which shall be used instead of the current activated on in the d2c configuration.
--origin <string>, -o <string>Each request to the DMO API requires the HTTP header field
X-M2M-ORIGIN. With the option –origin you can overwrite the default value of d2ccli. By convension oneM2M requires that the X-M2M-ORIGIN value is prefixed with a C character. This is done automatically by d2c, so please define the origin without the leading C.--help, -hDisplays the help for this command.
--infoTurn on info logging.
--debugTurn on debug logging.
--outfile <file>File into which the info or debug outputs shall be written additionaly.
--config-directory <directory>Path to the directory within which the file config.json can be found. By default this directory is
$HOME/.d2c.--config-file <file>Path to the configuration file. By default this path is
$HOME/.d2c/config.json.d2c update-resource --resource-name device01-444 --body '{
"m2m:nod": {
"lbl": [
"profile:SCS-lwM2M",
"ICCID:89374121317959919924",
"UplinkProperty_address:Kuckhoffstr 114A, 13156 Berlin",
"Decoder_Selector:adeunis-comfort-lwm2m",
"lastMaintenance:25.3.2025 1300"
]
}
}'
{
"m2m:nod": {
"ni": "urn:gsma:imei:device01-444",
"lbl": [
"profile:SCS-lwM2M",
"ICCID:89374121317959919924",
"UplinkProperty_address:Kuckhoffstr 114A, 13156 Berlin",
"Decoder_Selector:adeunis-comfort-lwm2m",
"lastMaintenance:25.3.2025 1300"
],
"rn": "device01-444",
"ty": 14,
"ri": "68249f65908f5f3d865da5e7",
"pi": "d2c-dev-1",
"ct": "20250514T134925,633000",
"lt": "20250514T135412,071000"
}
}
{
"m2m:dvi": {
"loc": "geo:25.245470,51.454009",
"dc": "Temperaturs, Humidity, CO2, VOC Sensor from adeunis",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1"
}
}
d2c update-resource --resource-name device01-444/device-info --body-file ./device-info.json
{
"m2m:dvi": {
"rn": "device-info",
"mgd": 1007,
"dty": "Pretty Device",
"loc": "geo:25.245470,51.454009",
"dlb": "this is a label",
"dc": "Temperaturs, Humidity, CO2, VOC Sensor from adeunis",
"dvnm": "This is the name of the device",
"fwv": "fw 1.0.1",
"swv": "sw 2.0.1",
"osv": "os 3.0.1",
"hwv": "2024.1 PC r1",
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE",
"ty": 13,
"ri": "68249f65908f5f3d865da5ef",
"pi": "68249f65908f5f3d865da5e7",
"ct": "20250514T134926,002000",
"lt": "20250514T141126,171000"
}
}
{
"m2m:dvi": {
"loc": "geo:25.245470,51.454009",
"dc": "Temperaturs, Humidity, CO2, VOC Sensor from adeunis",
"fwv": "fw 1.1.0",
"swv": "sw 2.1.0",
"osv": "os 3.3.4"
}
}
d2c update-resource --resource-id 68249f65908f5f3d865da5ef --body-file ./device-info.json
{
"m2m:dvi": {
"rn": "device-info",
"mgd": 1007,
"dty": "Pretty Device",
"loc": "geo:25.245470,51.454009",
"dlb": "this is a label",
"dc": "Temperaturs, Humidity, CO2, VOC Sensor from adeunis",
"dvnm": "This is the name of the device",
"fwv": "fw 1.1.0",
"swv": "sw 2.1.0",
"osv": "os 3.3.4",
"hwv": "2024.1 PC r1",
"man": "PSsystec",
"mod": "Smartbox Mini",
"smod": "NB-IoT",
"cnty": "DE",
"ty": 13,
"ri": "68249f65908f5f3d865da5ef",
"pi": "68249f65908f5f3d865da5e7",
"ct": "20250514T134926,002000",
"lt": "20250514T141439,788000"
}
}
delete-resource
- Description
- Options
- Global Options
- Samples
With the command d2c delete-resource you can delete an existing resource objects by its name or by its id.
d2c update-resource --resource-name <string> | -rn <string>
--resource-id <string> | -ri <string>
[--profile-file <file> | -p <file>]
[--origin <string> | -o <string>]
[--help | -h]
[--debug]
[--info]
[--outfile <filepath>]
[--config-directory <directory>]
[--config-file <file>]
--resource-name <string>, -rn <string>With the –resource-name option you can identify the object you like to delete by its name. In case you like to delete a child object you can also use its complete name-path. For excample if you want to delete a device uplink message from the communication store you can use
-resource-name device-communication/device01-444/received-msg/ef3bef8b-13fd-4448-ac8f-48817cfa0ffb. Alternatively you can identify the object by its id with the –resource-id option.--resource-name <string>, -rn <string>To identify the object to delete by its id you can use the –resource-id option. Alternatively you can identify the object by its name with the –resource-name option.
--profile-file <file>, -p <file>DMO access profile file which shall be used instead of the current activated on in the d2c configuration.
--origin <string>, -o <string>Each request to the DMO API requires the HTTP header field
X-M2M-ORIGIN. With the option –origin you can overwrite the default value of d2ccli. By convension oneM2M requires that the X-M2M-ORIGIN value is prefixed with a C character. This is done automatically by d2c, so please define the origin without the leading C.--help, -hDisplays the help for this command.
--infoTurn on info logging.
--debugTurn on debug logging.
--outfile <file>File into which the info or debug outputs shall be written additionaly.
--config-directory <directory>Path to the directory within which the file config.json can be found. By default this directory is
$HOME/.d2c.--config-file <file>Path to the configuration file. By default this path is
$HOME/.d2c/config.json.d2c delete-resource --resource-name scs-message-monitor-023
d2c delete-resource -rn device-communication/device01-444/received-msg/ef3bef8b-13fd-4448-ac8f-48817cfa0ffb
d2c delete-resource -ri 68259e7d908f5f3d865da5f6
d2c get-resources --resource-name device-communication/device01-444/received-msg --select "m2m:cin" \
| jq '.[] | [.ri] | @csv' \
| sed 's/\\"//g; s/"//g' \
| while read id ; do
echo d2c delete-resource --resource-id $id
d2c delete-resource --resource-id $id
done