1. API Description
api request domain name:
iot.cloud.tencent.com/api/exploreropen/tokenapi.
This interface (AppGetProducts) obtains product information.2. Input Parameter
Name | Type | Required | Description |
AccessToken | String | Yes | common parameter, AccessToken is used for user authentication of a logged-in user. |
RequestId | String | Yes | Common parameter, unique request ID, can be generated manually. It is recommended to use uuid. When locating issues, you need to provide the RequestId for the request. |
Action | String | Yes | Common parameter, this interface takes values: AppGetProducts. |
ProductIds | Array of String | Yes | Product ID array. |
DeviceIds | Array of String | No | Device ID array. |
3. Output Parameter
Name | Type | Description |
Products | Return product information. | |
RequestId | String | Common parameters, unique request ID, same as input parameters. |
4. Example
Input Example
POST https://iot.cloud.tencent.com/api/exploreropen/tokenapi HTTP/1.1content-type: application/json{"AccessToken": "8b4a70dd16105f******************18edd4e78a3bb8ec","RequestId": "27HPvi1ylv","Action": "AppGetProducts","ProductIds":["FVYYYEL4ON"],"DeviceIds":["QDA1PZLBNB/aaa", "QDA1PZLBNB/bbb"]}
Output example: succeed
{"Response":{"Products":[{"ProductId":"FVYYYEL4ON","Name":"c1","Description":"yes","State":"","DataTemplate":"{"version":"1.0","profile":{"ProductId":"FVYYYEL4ON","CategoryId":"1"},"properties":[{"id":"mac","name":"mac address","desc":"wifi router mac address","required":true,"mode":"r","define":{"type":"string","min":"0","max":"30"}},{"id":"signal","name":"wifi signal strength","desc":"wifi signal strength value","mode":"r","define":{"type":"int","unit":"dbm","step":"1","min":"-180","max":"180","start":"1"}},{"id":"ssid","name":"SSID","desc":"SSID of the wifi hotspot connected by the device","mode":"r","define":{"type":"string","min":"0","max":"64"}},{"id":"severip","name":"IP address integrated by the wifi router","desc":"IP address integrated by the wifi router","mode":"r","define":{"type":"string","min":"0","max":"64"}},{"id":"nmacs","name":"other hotspot MAC address","desc":"other hotspot MAC addresses that can be received","mode":"r","define":{"type":"string","min":"0","max":"64"}}],"events":[],"actions":[]}"AppTemplate":"","NetType":"wifi","CategoryId":1,"ProductType":0,"UpdateTime":1600159203},{"ProductId":"QDA1PZLBNB","Name":"light5 do not delete""Description":"","State":"","DataTemplate":"{"version":"1.0","profile":{"ProductId":"QDA1PZLBNB","CategoryId":"141"},"properties":[{"id":"power_switch","name":"light switch","desc":"control light on/off","required":true,"mode":"rw","define":{"type":"bool","mapping":{"0":"off","1":"on"}}},{"id":"color","name":"light color","desc":"light color","mode":"rw","define":{"type":"enum","mapping":{"0":"Red","1":"Green","2":"Blue"}}},{"id":"brightness","name":"light brightness","desc":"light brightness","mode":"rw","define":{"type":"int","unit":"%","step":"1","min":"0","max":"100","start":"1"}},{"id":"name","name":"light position name","desc":"light position name, such as study room, living room","mode":"rw","required":false,"define":{"type":"string","min":"0","max":"64"}},{"id":"Temperature","name":"temperature","desc":"","mode":"rw","define":{"type":"float","min":"0","max":"100","start":"0","step":"1","unit":""},"required":false},{"id":"temp_max","name":"max temperature","desc":"","mode":"rw","define":{"type":"int","min":"0","max":"100","start":"0","step":"1","unit":""},"required":false},{"id":"LBS_BS","name":"LBS_BS","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false},{"id":"FOO","name":"FOO","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false},{"id":"GPS_Ext","name":"GPS_Ext","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false}],"events":[{"id":"status_report","name":"DeviceStatus","desc":"Report the device status","type":"info","required":false,"params":[{"id":"status","name":"running_state","desc":"Report current device running state","define":{"type":"bool","mapping":{"0":"normal","1":"fault"}}},{"id":"message","name":"Message","desc":"Some extra message","define":{"type":"string","min":"0","max":"64"}}]},{"id":"low_voltage","name":"LowVoltage","desc":"Alert for device voltage is low","type":"alert","required":false,"params":[{"id":"voltage","name":"Voltage","desc":"Current voltage","define":{"type":"float","unit":"V","step":"1","min":"0.0","max":"24.0","start":"1"}}]},{"id":"hardware_fault","name":"Hardware_fault","desc":"Report hardware fault","type":"fault","required":false,"params":[{"id":"name","name":"Name","desc":"Name like: memory,tf card, censors...","define":{"type":"string","min":"0","max":"64"}},{"id":"error_code","name":"Error_Code","desc":"Error code for fault","define":{"type":"int","unit":"","step":"1","min":"0","max":"2000","start":"1"}}]}],"actions":[]}"AppTemplate":"","NetType":"else","CategoryId":141,"ProductType":0,"UpdateTime":1600265188},{"ProductId":"QDA1PZLBNB","Name":"light5 do not delete""Description":"","State":"","DataTemplate":"{"version":"1.0","profile":{"ProductId":"QDA1PZLBNB","CategoryId":"141"},"properties":[{"id":"power_switch","name":"light switch","desc":"control light on and off","required":true,"mode":"rw","define":{"type":"bool","mapping":{"0":"off","1":"on"}}},{"id":"color","name":"color","desc":"light color","mode":"rw","define":{"type":"enum","mapping":{"0":"Red","1":"Green","2":"Blue"}}},{"id":"brightness","name":"brightness","desc":"light brightness","mode":"rw","define":{"type":"int","unit":"%","step":"1","min":"0","max":"100","start":"1"}},{"id":"name","name":"light position name","desc":"light position name, such as study room, living room, etc.","mode":"rw","required":false,"define":{"type":"string","min":"0","max":"64"}},{"id":"Temperature","name":"temperature","desc":"","mode":"rw","define":{"type":"float","min":"0","max":"100","start":"0","step":"1","unit":""},"required":false},{"id":"temp_max","name":"max temperature","desc":"","mode":"rw","define":{"type":"int","min":"0","max":"100","start":"0","step":"1","unit":""},"required":false},{"id":"LBS_BS","name":"LBS_BS","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false},{"id":"FOO","name":"FOO","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false},{"id":"GPS_Ext","name":"GPS_Ext","desc":"","mode":"rw","define":{"type":"string","min":"0","max":"2048"},"required":false}],"events":[{"id":"status_report","name":"DeviceStatus","desc":"Report the device status","type":"info","required":false,"params":[{"id":"status","name":"running_state","desc":"Report current device running state","define":{"type":"bool","mapping":{"0":"normal","1":"fault"}}},{"id":"message","name":"Message","desc":"Some extra message","define":{"type":"string","min":"0","max":"64"}}]},{"id":"low_voltage","name":"LowVoltage","desc":"Alert for device voltage is low","type":"alert","required":false,"params":[{"id":"voltage","name":"Voltage","desc":"Current voltage","define":{"type":"float","unit":"V","step":"1","min":"0.0","max":"24.0","start":"1"}}]},{"id":"hardware_fault","name":"Hardware_fault","desc":"Report hardware fault","type":"fault","required":false,"params":[{"id":"name","name":"Name","desc":"Name like: memory,tf card, censors...","define":{"type":"string","min":"0","max":"64"}},{"id":"error_code","name":"Error_Code","desc":"Error code for fault","define":{"type":"int","unit":"","step":"1","min":"0","max":"2000","start":"1"}}]}],"actions":[]}"AppTemplate":"","NetType":"else","CategoryId":141,"ProductType":0,"UpdateTime":1600265188}],"RequestId":"27HPvi1ylv"}}
5. Error Code
Error Code | Description |
InternalError | Internal error. |
InvalidParameterValue | Invalid parameter value. |
InvalidParameterValue.InvalidAccessToken | The Token is invalid. |