Thing model service

更新时间:
复制 MD 格式

This document describes the service APIs for devices. Client applications can use these APIs to query and control device information, including basic details, reported data, and Thing Specification Language (TSL) definitions.

Query and control device status

Device extension properties

Device timers

Control devices with app widgets

Get basic information about a thing

Description

pathVersionDescriptionUser authentication required
/thing/info/get1.0.2Gets information about a thing, such as the device name, MAC address, and device activation time.Yes. The client software development kit (SDK) must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.

Response parameters

ParameterTypeRequiredDescription
gmtModifiedLongYesThe time when the device record was last modified. This is an internal field and can be ignored.
activeTimeLongNoThe time when the device was first activated.
gmtCreateLongYesThe time when the device record was created. For IoT Platform, this is the time when the device certificate was generated during mass production.
productKeyStringYesProduct key
statusLastIntegerYesThe previous device status.
macStringNoThe MAC address.
deviceSecretStringYesDevice secret
iotIdStringYesThe unique identifier of the device.
nameStringYesThe device name.
sdkVersionStringNoThe SDK version number.
snStringNoThe device SN.
thingTypeStringYesThe device type.
  • VIRTUAL: A virtual device.
  • VIRTUAL_SHADOW: A virtual device.
  • DEVICE: A physical device.
firmwareVersionStringNoThe firmware version number.
rbacTenantIdStringYesThe tenant ID.
statusIntegerYesThe device status.
  • 0: Inactive
  • 1: Online
  • 3: Offline
  • 8: Disabled
netAddressStringNoThe IP address.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D2429xxxxE4F31A2697"
        }
    }      
  • Successful response example
    {
        "code": 200,
        "data": {
            "gmtModified": 1517918765000,
            "activeTime": null,
            "gmtCreate": 1500017648000,
            "productKey": "kQxxxxqA",
            "statusLast": null,
            "mac": null,
            "netAddress": null,
            "deviceSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
            "iotId": "D95D242xxxxxxxx4F31A2697",
            "name": "Kq7rgxxxxxwJh",
            "nickname": null,
            "sdkVersion": null,
            "sn": null,
            "thingType": "DEVICE",
            "firmwareVersion": "1.0.0",
            "rbacTenantId": "ADSBCxxxx918327917",
            "status": 1
        },
        "message": "success",
        "localizedMsg": null
    }

Get the property timeline data of a thing

Description

pathVersionDescriptionUser authentication required
/living/device/property/timeline/get1.0.0Gets the property timeline data of a thing. You can retrieve up to one year of data.
Note After you call /living/device/reset, this API will no longer retrieve the historical data of the device.
Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
identifierStringYesThe property identifier.
startLongYesThe start time of the timeline.
endLongYesThe end time of the timeline.
limitIntYesThe maximum number of entries to query. The maximum value is 200.
orderStringYes
  • asc: Chronological order.
  • desc: Reverse chronological order.

Response parameters

ParameterTypeRequiredDescription
iotidStringYesThe device identifier.
dataStringYesThe timeline data of the device.
modifytimeLongYesThe time when the property was updated.
propertyStringYesThe property identifier.
batchIdStringYesThe batch ID. Properties reported in the same batch from the device have the same batch ID.
timestampLongYesThe timestamp when the property was collected.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D24xxxxCCE4F31A2697",
            "identifier": "xxxx",
            "start": 1517217645000,
            "end": 1517217645000,
            "limit": 10,
            "order": "asc"
        }
    }     
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": {
        "items": [
          {
            "iotid": "D95D24294xxxxxxxx4F31A2697",
            "data": "1.23",
            "modifytime": 1511812747287,
            "property": "Lixxxxt",
            "batchId": "2fc766cxxxxxxxxed1f3e4b61803",
            "timestamp": 1511812747245
          },
          {
            "iotid": "xqxyZjSKzxxxxxxxx010851c00",
            "data": 1.24,
            "modifytime": 1511812747288,
            "property": "Lxxxxlt",
            "batchId": "2fc766cxxxx1f3e4b61803",
            "timestamp": 1511812747245
          }
        ],
        "timestamp": 1511812747245
      }
    }   

Get the event timeline data of a thing

Description

pathVersionDescriptionUser authentication required
/living/device/event/timeline/get1.0.0Gets the event timeline data of a thing. You can retrieve up to one year of data.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
identifierStringYesProperty Identifier
eventTypeStringYesThe event type.
startLongYesThe start time of the timeline.
endLongYesThe end time of the timeline.
limitIntYesThe maximum number of entries to query. The maximum value is 200.
orderBooleanYes
  • asc: Chronological order.
  • desc: Reverse chronological order.

Response parameters

ParameterTypeRequiredDescription
eventCodeStringYesThe event identifier.
iotIdStringYesThe unique identifier of the thing.
eventNameStringYesThe event name.
eventTypeStringYesThe event type.
eventBodyStringYesEvent parameters
batchIdStringYesThe batch ID. Events reported in the same batch from the device have the same batch ID.
timestampLongYesThe time when the data was collected.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D24xxxxE4F31A2697",
            "identifier": "xxxx",
            "eventType": "xxxx",
            "start": 1517217645000,
            "end": 1517217645000,
            "limit": 10,
            "order": "asc"
        }
    }      
  • Successful response example
    {
        "code": 200,
        "message": "success",
        "localizedMsg": "",
        "data": {
            "items": [
                {
                    "eventCode": "Error",
                    "iotId": "D95D24xxxxECCE4F31A2697",
                    "eventName": "Fault Report",
                    "eventType": "info",
                    "eventBody": "{\"ErrorCode\": 0}",
                    "batchId": "5ebc6axxxx3edde6d28c8fb3",
                    "timestamp": 1516342985261
                },
                {
                    "eventCode": "Error",
                    "iotId": "YzqEnI5xxxxo0010840500",
                    "eventName": "Fault Report",
                    "eventType": "info",
                    "eventBody": "{\"ErrorCode\": 0}",
                    "batchId": "4a0b5a7xxxxxxxx8d5ff77456f1",
                    "timestamp": 1516342995305
                }
            ],
            "timestamp": 1516343075699
        }
    }  

Set the properties of a thing

Description

pathVersionDescriptionUser authentication required
/thing/properties/set1.0.2Set the properties of a thingYes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
itemsJSONYesSet the parameter

Response parameters

None

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D242xxxxE4F31A2697",
            "items": {
                "LightSwitch1": 0,
                "LightSwitch2": 0
            }
        }
    }        
  • Successful response example
    {
      "code": 200,
      "data": null,
      "message": "success",
      "localizedMsg": ""
    }   

Get the events of a thing

Description

pathVersionDescriptionUser authentication required
/thing/events/get1.0.2Gets the latest reported events of a thing. If an event has not been reported, it is not returned.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.

Response parameters

ParameterTypeRequiredDescription
identifierStringYesThe event identifier.
timeLongYesThe time when the data was collected.
typeStringYesThe event type.
valueObjectYesThe response parameters of the event.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D24xxxxCE4F31A2697"
        }
    }
  • Successful response example
    {
        "code": 200,
        "data": [
            {
                "identifier": "Error",
                "time": 1517420842314,
                "type": "info",
                "value": {
                    "Shrink5": 12,
                    "Shrink20": {
                        "testKey2": "val2",
                        "testKey": "val"
                    }
                }
            }
        ],
        "message": "success",
        "localizedMsg": null
    }

Get the TSL template of a thing by device ID

Description

pathVersionDescriptionUser authentication required
/thing/tsl/get1.0.2Gets the TSL template of a thing, which includes definitions for properties, events, and services.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.

Response parameters

ParameterTypeRequiredDescription
dataJSON StringNoThe TSL template JSON object of the thing.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D2xxxxCE4F31A2697"
        }
    }       
  • Successful response example
    {
     "code": 200,
        "data": {
            "schema": "http://aliyun/iot/thing/desc/schema",
            "profile": {
                "productKey": "xxxxxxx",
                "deviceName": "xxxxxxxxxxxxxxxx"
            },
            "link": "/sys/a1xxxxpck/YzqEnxxxx2pjjo/thing/",
            "services": [
                {
                    "outputData": [
    
                    ],
                    "identifier": "ToggleLightSwitch",
                    "inputData": [
    
                    ],
                    "method": "thing.service.ToggleLightSwitch",
                    "name": "Flip main light switch",
                    "required": false,
                    "callType": "async"
                }
            ],
            "properties": [
                {
                    "identifier": "LightSwitch",
                    "dataType": {
                        "specs": {
                            "0": "Off",
                            "1": "On"
                        },
                        "type": "bool"
                    },
                    "name": "Main light switch",
                    "accessMode": "rw",
                    "required": true
                }
            ],
            "events": [
                {
                    "outputData": [
                        {
                            "identifier": "ErrorCode",
                            "dataType": {
                                "specs": {
                                    "0": "Normal"
                                },
                                "type": "enum"
                            },
                            "name": "Error code"
                        }
                    ],
                    "identifier": "Error",
                    "method": "thing.event.Error.post",
                    "name": "Report error",
                    "type": "info",
                    "required": true
                }
            ]
        },
        "message": "success",
        "localizedMsg": null
    }

Get the TSL template of a thing by ProductKey

Description

pathVersionDescriptionUser authentication required
/thing/tsl/getByProducyKey1.0.2Gets the TSL template of a thing, which includes definitions for properties, events, and services.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
productKeyStringYesProductKey
deviceNameStringNodeviceName

Response parameters

ParameterTypeRequiredDescription
dataJSON StringNoThe TSL template JSON object of the thing.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "ProductKey": "xxxxxxxx",
            "deviceName": "xxxxxxxx"
        }
    }      
  • Successful response example
    {
     "code": 200,
        "data": {
            "schema": "http://aliyun/iot/thing/desc/schema",
            "profile": {
                "productKey": "xxxxxxx",
                "deviceName": "xxxxxxxxxxxxxxxx"
            },
            "link": "/sys/a1xxxck/YzqEnxxxxpjjo/thing/",
            "services": [
                {
                    "outputData": [
    
                    ],
                    "identifier": "ToggleLightSwitch",
                    "inputData": [
    
                    ],
                    "method": "thing.service.ToggleLightSwitch",
                    "name": "Flip main light switch",
                    "required": false,
                    "callType": "async"
                }
            ],
            "properties": [
                {
                    "identifier": "LightSwitch",
                    "dataType": {
                        "specs": {
                            "0": "Off",
                            "1": "On"
                        },
                        "type": "bool"
                    },
                    "name": "Main light switch",
                    "accessMode": "rw",
                    "required": true
                }
            ],
            "events": [
                {
                    "outputData": [
                        {
                            "identifier": "ErrorCode",
                            "dataType": {
                                "specs": {
                                    "0": "Normal"
                                },
                                "type": "enum"
                            },
                            "name": "Error code"
                        }
                    ],
                    "identifier": "Error",
                    "method": "thing.event.Error.post",
                    "name": "Report error",
                    "type": "info",
                    "required": true
                }
            ]
        },
        "message": "success",
        "localizedMsg": null
    }

Get the properties of a thing

Description

pathVersionDescriptionUser authentication required
/thing/properties/get1.0.2Gets the snapshot data of all properties of a thing.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe identifier of the thing.

Response parameters

ParameterSub-parameterTypeRequiredDescription
identifierThe property ID.
valueObjectYesThe data corresponding to the property.
timeLongYesThe time when the property was collected.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D24xxxxCE4F31A2697"
        }
    }
  • Successful response example
    {
      "code": 200,
      "data": {
        "_sys_device_mid": {
          "time": 1516356290173,
          "value": "example.demo.module-id"
        },
        "WorkMode": {
          "time": 1516347450295,
          "value": 0
        },
        "_sys_device_pid": {
          "time": 1516356290173,
          "value": "example.demo.partner-id"
        }
      },
      "message": "success",
      "localizedMsg": null
    }      

Invoke a service of a thing

Description

pathVersionDescriptionUser authentication required
/thing/service/invoke1.0.2Invokes a service of a thing.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe identifier of the thing.
identifierStringYesThe service identifier.
argsJSON StringYesThe input parameters of the service.

Response parameters

ParameterTypeRequiredDescription
dataStringYesThe return value type and value depend on the device-side implementation logic.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D2xxxxCE4F31A2697",
            "identifier": "xxxx",
            "args": {}
        }
    }             
  • Successful response example
    {
      "code": 200,
      "data": xxx,  // xxx is the actual return value of the service.
      "message": "success",
      "localizedMsg": ""
    }     

Get the connection status of a thing

Description

pathVersionDescriptionUser authentication required
/thing/status/get1.0.2Gets the connection status of a thing.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.

Response parameters

ParameterTypeRequiredDescription
statusIntegerYesThe device status.
  • 0: Inactive
  • 1: Online
  • 3: Offline
  • 8: Disabled
timeLongYesThe time when the status changed.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D2xxxxCCE4F31A2697"
        }
    } 
  • Successful response example
    {
      "code": 200,
      "data": {
        "time": 1517923297000,
        "status": 3
      },
      "message": "success",
      "localizedMsg": null,
    }    

Execute a factory reset task

Description

pathVersionDescriptionLogon required
/living/device/reset1.0.0Restores the factory settings of a device. This API also notifies the device and purges the device's snapshot data from the cloud. The API call returns a task ID for the factory reset task. The task runs asynchronously. Use the task ID with the "Query the execution status of a factory reset task" API to check the status.
Note This API can also delete the historical data of the device.
Yes

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the device.

Response parameters

ParameterTypeDescription
taskIdStringThe ID of the factory reset task.

Examples

  • Request example
    {
        "id":"xxx",   // The request ID
        "version":"1.0.0",
        "request":{
            "language":"zh-CN",
            "appKey":"xxx",
            "iotToken":"xxx",
            "apiVer":"1.0.0"  // The API version number
        },
        "params":{
            "iotId":"xxx"
        }
    }
  • Successful response example
    {
        "code":200,
        "message":"success",
        "localizedMsg":"",
        "data":"taskId"
    }

Query the execution status of a factory reset task

Description

pathVersionDescriptionLogon required
/living/device/reset/task/state/get1.0.0Queries the execution status of a factory reset task.Yes

Request parameters

ParameterTypeRequiredDescription
taskIdStringYesThe ID of the factory reset task.

Response parameters

ParameterTypeDescription
dataStringThe execution status of the task. Valid values: SUCCESS, FAILED, TIMEOUT, and RUNNING.

Examples

  • Request example
    {
        "id":"xxx",   // The request ID
        "version":"1.0.0",
        "request":{
            "language":"zh-CN",
            "appKey":"xxx",
            "iotToken":"xxx",
            "apiVer":"1.0.0"  // The API version number
        },
        "params":{
            "taskId":"xxx"
        }
    }
  • Successful response example
    {
        "code":200,
        "message":"success",
        "localizedMsg":"",
        "data": "SUCCESS"
    }

Set device extension information

A single device cannot have more than 10 tags.

Description

pathVersionDescriptionUser authentication required
/thing/extended/property/set1.0.2Set extended properties for a ThingYes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
dataKeyStringYesThe identifier of the extension property. The identifier must be less than 64 characters in length.
dataValueStringYesThe value of the extension property. The value must be less than 128 characters in length.

Response parameters

None

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D242xxxxxxxx4F31A2697",
            "dataKey": "xxxx",
            "dataValue": "xxxx"
        }
    } 
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": null
    }        

Get device extension information

Description

pathVersionDescriptionUser authentication required
/thing/extended/property/get1.0.2Gets the extension property data of a thing.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
dataKeyStringYesThe identifier of the extension property.

Response parameters

ParameterTypeRequiredDescription
dataStringYesThe value of the extension property.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.2",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D2xxxxxxxxF31A2697",
            "dataKey": "xxxx"
        }
    }  
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": "xxxx"
    }         

Delete device extension information

Description

pathVersionDescriptionUser authentication required
/thing/extended/property/delete1.0.0Deletes the extension property data of a thing.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe unique identifier of the thing.
dataKeyStringYesThe identifier of the extension property.

Response parameters

None

Examples

  • Request example
    {
        "id": "1509086454181",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
            "iotId": "D95D24xxxx4F31A2698",
        "dataKey": "xxxx"
        }
    }      
  • Successful response example
    {
      "code": 200,
     "message": "success",
      "localizedMsg": null,
      "data": null
    }         

Query the user's widget device list

Description

pathVersionDescriptionUser authentication required
/iotx/ilop/queryComponentProduct1.0.0Queries the list of a user's widget devices.Yes. The client SDK must enable identity authentication.

Request parameters

None

Response parameters

ParameterTypeRequiredDescription
dataJSON ArrayYesA list of widget devices. For the data structure of a single device, see the "Widget device details" table below.

Widget device details

ParameterTypeRequiredDescription
productKeystringYesProduct Comparison
deviceNamestringYesThe device name.
iotIdstringYesThe device ID.
propertiesJSON ArrayYesA list of properties. For the detailed structure, see the table below.
nickNamestringYesAlias
productNamestringYesThe product name.
iconUrlstringYesImage URL
deviceStatusintYesThe device status.

Property list details

ParameterTypeRequiredDescription
propertyIdentifierstringYesThe property ID.
propertyNamestringYesThe property name.
propertyValuestringYesThe property value.
propertyDataTypestringYesThe data type of the property value.

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
        }
    }       
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": [{
        "deviceName":"xxx",
        "deviceStatus":1,
        "iconUrl":"http://iotx-paas-admin.oss-cn-shanghai.aliyuncs.com/publish/image/xxxxxx.png",
        "iotId":"xxxxxx",
        "productKey":"xxx",
        "productName":"a",
        "properties":[{
          "propertyDataType":"bool",
          "propertyIdentifier":"PowerSwitch",
          "propertyName":"Power Switch",
          "propertyValue":"1"}]
          },{
        "deviceName":"xxxx",
        "deviceStatus":1,
        "iconUrl":"http://iotx-paas-admin.oss-cn-shanghai.aliyuncs.com/publish/image/xxxxx.png",
        "iotId":"xxxx",
        "productKey":"xxx",
        "productName":"xxx",
        "properties":[{
          "propertyDataType":"bool",
          "propertyIdentifier":"LightSwitch",
          "propertyName":"Main Light Switch",
          "propertyValue":"0"
        }]
      }]
    }            

Update the user's widget device list

Description

pathVersionDescriptionUser authentication required
/iotx/ilop/updateComponentProduct1.0.0Updates the list of a user's widget devices.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
dataArrayYesA list of widget devices.

Widget device details

ParameterTypeRequiredDescription
productKeystringYesproductKey
iotIdstringYesThe device ID.
propertiesDataNoA list of properties.
Property list details
ParameterTypeRequiredDescription
propertyIdentifierstringNoThe property ID.

Response parameters

None

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
          "componentProductList": [{
            "iotId":"xxxxxx",
            "productKey":"xxx"
          },{
            "iotId":"xxxxxx",
            "productKey":"xxx"
          }]
       }
    }
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": null
    }    

Query the property list of a user's widget devices

Description

pathVersionDescriptionUser authentication required
/iotx/ilop/queryComponentProperty1.0.0Queries the property list of a user's widget devices.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
productKeystringYesProduct key
iotIdstringYesDevice ID
querystructNoThe query conditions.

Query condition details

ParameterTypeRequiredDescription
dataTypestringNoThe data type of the property.
I18LanguagestringNoMultilingual
languageListarrayNoMultilingual List
allLanguageboolNoIndicates whether to retrieve all languages.
replaceOriginboolNoIndicates whether to replace the default language.

Response parameters

ParameterTypeRequiredDescription
propertyIdentifierstringYesProperty ID
propertyNamestringYesThe property name.
propertyValuestringYesThe property value.
propertyDataTypestringYesThe data type of the property value.
added_componentboolYesAdd to widget

Examples

  • Request example
    {
        "id": "1509086454180",
        "version": "1.0",
        "request": {
            "apiVer": "1.0.0",
            "iotToken": "token"
        },
        "params": {
          "iotId":"xxxxxx",
          "productKey":"xxx",
          "query":{
            "dataType":"BOOL"
          }
        }
    }          
  • Successful response example
    {
      "code": 200,
      "message": "success",
      "localizedMsg": null,
      "data": [
        {"added_component":false,
         "dataType":"BOOL",
         "i18nDTO":{
           "i18nData":{"name":{"zh-CN":"Power Switch"}}
         },
         "productKey":"xxxx",
         "propertyIdentifier":"PowerSwitch",
         "propertyName":"Power Switch"}
      ]
    }