URL: http://ota.heclouds.com/ota/devInfo
I only want to see examples!!!
Device ID is a unique ID No. assigned by the platform to each device. If your device has not yet obtained the device ID and needs to be upgraded when accessing the platform for the first time, device ID can be obtained using the unique identification through this interface.
Name | Format | Required or not | Description |
---|---|---|---|
Content-Type | string | Yes | Must be application/json. |
Authorization | string | Yes | Security authentication information |
Name | Format | Required or not | Description |
---|---|---|---|
pid | long | Yes | Product id |
authInfo | string | Yes | Unique device identification, please refer to the following for details. |
Name | Format | Description |
---|---|---|
errno | int | Call error code, where 0 means success. |
error | string | Error description, where “succ” means success. |
data | json | Device-related information returned after interface is successfully called. See the Data Description Table. |
Name | Format | Description |
---|---|---|
dev_id | string | Device ID |
The meaning corresponding to the request parameter authInfo is different based on different product protocols. The details are as below:
If NB protocol is used for the product, the unique device identification is the “IMEI” field when creating the device on the platform.
If MQTTS protocol (new version MQTT) is used for the product, the unique device identification is the “device name” field when creating the device on the platform.
If MQTT/EDP/TCP pass-through protocol is used for the product, the unique device identification is the “authentication information” field when creating the device on the platform.
If HTTP protocol is used for the product, the unique device identification is the “device number” field when creating the device on the platform.
If Modbus protocol is used for the product, the unique device identification is the json string consisting of “DTU serial number” and “DTU password” field when creating the device on the platform.
If JT/T808 protocol is used for the product, the unique device identification is the json string consisting of “terminal model” and “terminal ID” field when creating the device on the platform.
{
"pid":123,
"authInfo":"869975036903162"//NB unique device identification is IMEI number. Please refer to above “Explanation” for other protocols.
}
{
"errno": 0,
"error":"succ",
"data":
{
"dev_id":"233444"
}
}