diff --git a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx index 964ee78855..0a4babe459 100644 --- a/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx +++ b/src/content/_includes/docs/reference/lwm2m-api/rpc-commands.mdx @@ -189,6 +189,55 @@ Common execute targets: | `/1/0/8` | Registration Update Trigger | | `/1/0/9` | Bootstrap-Request Trigger | +### Execute with Arguments + +Execute a resource with arguments: execute Reboot on the device, passing a single-digit argument 5. + +```json +{"method": "Execute", "params": {"id": "/3/0/4", "value": 5}} +``` + +``` +Execute {"id":"/3/0/4","value":5} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with arguments: execute Factory Reset on the device with argument `2` set to `60`. + +```json +{"method": "Execute", "params": {"id": "/3/0/5", "value": "2='60'"}} +``` + +``` +Execute {"id":"/3/0/5","value":"2='60'"} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with multiple parameters: execute Factory Reset on the device with two arguments: +- Digit 2 without a value. +- Digit 0 with a link value. + +```json +{"method": "Execute", "params": {"id": "/3/0/5", "value": "2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"}} +``` + +``` +Execute {"id":"/3/0/5","value":"2,0='https://thingsboard.io/docs/reference/lwm2m-api/'"} +# Response: {"result":"CHANGED"} +``` + +Execute a resource with multiple parameters: execute Factory Reset with multiple arguments without values. +- According to the OMA LwM2M execute arguments format, this represents ten arguments from 0 to 9, none of which have values. + +```json +{"method": "Execute", "params": {"id": "/3/0/5", "value": "0,1,2,3,4,5,6,7,8,9"}} +``` + +``` +Execute {"id":"/3/0/5","value":"0,1,2,3,4,5,6,7,8,9"} +# Response: {"result":"CHANGED"} +``` + ## Delete Delete an Object Instance. The mandatory Device Object (ID 3) cannot be deleted.