tencent cloud

IoT Hub

Release Notes and Announcements
Release Notes
Product Introduction
Overview
Features
Strengths
Use Cases
Use Limits
Basic Concepts
Getting Started
Quick Start
Scenario 1: Device Interconnection
Scenario 2: Device Status Reporting and Setting
MQTT.fx Connection Guide
Console Guide
Product Management
Rule Engine
Sub-account Access to IoT Hub
Firmware Upgrade
Resource Management
Certificate Management
Developer Manual
Feature Components
Signature Algorithm
Device Authentication
Device Connection Protocol
Gateway Subdevice
Message Communication
Device Shadow
Device Firmware Upgrade
Remote Device Configuration
Resource Management
Device Log Reporting
NTP Service
Device Connection Manual
Device Connection Overview
Connection Based on SDK for C
Connection Based on SDK for Android
Connection Based on SDK for Java
Connection Based on SDK for Python
API Documentation
History
Introduction
API Category
Making API Requests
Device Shadow APIs
Device APIs
CA Certificate APIs
Product APIs
Data Types
Error Codes
FAQs
General
Device Connection and Reporting
Rule Engine
Console
IoT Hub Policy
Privacy Policy
Data Privacy And Security Agreement
Glossary

DescribeDevice

PDF
Focus Mode
Font Size
Last updated: 2025-11-13 20:52:07

1. API Description

Domain name for API request: iotcloud.intl.tencentcloudapi.com.

This API is used to query device details.

A maximum of 20 requests can be initiated per second for this API.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.

Parameter Name Required Type Description
Action Yes String Common Params. The value used for this API: DescribeDevice.
Version Yes String Common Params. The value used for this API: 2021-04-08.
Region Yes String Common Params. For more information, please see the list of regions supported by the product.
ProductId Yes String Product ID
DeviceName Yes String Device name

3. Output Parameters

Parameter Name Type Description
DeviceName String Device name
Online Integer Whether the device is online. 0: offline; 1: online
LoginTime Integer Device login time
Version String Device firmware version
LastUpdateTime Integer Last updated time of the device
DeviceCert String Device certificate
DevicePsk String Device key
Tags Array of DeviceTag Device attribute
DeviceType Integer Device type
Imei String International Mobile Equipment Identity (IMEI)
Isp Integer ISP
ConnIP Integer IP address
LoraDevEui String DevEUI of a LoRa device
LoraMoteType Integer MoteType of a LoRa device
LogLevel Integer SDK log level of the device
Note: this field may return null, indicating that no valid value is obtained.
FirstOnlineTime Integer The first time when the device went online
Note: this field may return null, indicating that no valid value is obtained.
LastOfflineTime Integer The last time when the device went offline
Note: this field may return null, indicating that no valid value is obtained.
CreateTime Integer Device creation time
Note: this field may return null, indicating that no valid value is obtained.
CertState Integer Whether the device certificate has been obtained. 0: no; 1: yes
Note: this field may return null, indicating that no valid value is obtained.
EnableState Integer Whether the device is enabled
Note: this field may return null, indicating that no valid value is obtained.
Labels Array of DeviceLabel Device tags
Note: this field may return null, indicating that no valid value is obtained.
ClientIP String IP address of the MQTT client
Note: this field may return null, indicating that no valid value is obtained.
FirmwareUpdateTime Integer Firmware update time of the device
Note: this field may return null, indicating that no valid value is obtained.
CreateUserId Integer Account ID of the creator
Note: this field may return null, indicating that no valid values can be obtained.
RequestId String The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.

4. Example

Example1 Querying device details

Input Example

https://iotcloud.intl.tencentcloudapi.com/?Action=DescribeDevice
&ProductId=ABCDE12345
&DeviceName=abc
&<Common request parameters>

Output Example

{
    "Response": {
        "EnableState": 1,
        "LastOfflineTime": 1,
        "Version": "xx",
        "CertState": 1,
        "Online": 1,
        "FirmwareUpdateTime": 1,
        "DeviceName": "xx",
        "Tags": [
            {
                "Tag": "Key",
                "Type": 1,
                "Name": "Key",
                "Value": "Key"
            },
            {
                "Tag": "xx",
                "Type": 1,
                "Name": "xx",
                "Value": "xx"
            }
        ],
        "LogLevel": 1,
        "FirstOnlineTime": 1,
        "DeviceCert": "xx",
        "Imei": "Imei",
        "ClientIP": "127.0.0.1",
        "DevicePsk": "DevicePsk",
        "Isp": 1,
        "NbiotDeviceID": "123124",
        "LoraDevEui": "xx",
        "DeviceType": 1,
        "RequestId": "xx",
        "LoginTime": 1,
        "ConnIP": 1,
        "LastUpdateTime": 1,
        "Labels": [
            {
                "Value": "xx",
                "Key": "xx"
            }
        ],
        "CreateTime": 1,
        "LoraMoteType": 1,
        "CreateUserId": 0
    }
}

5. Developer Resources

SDK

TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

Command Line Interface

6. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Error Code Description
InternalError Internal error.
InternalError.DBOperationError An internal database error occurred.
InvalidParameterValue Invalid parameter value.
ResourceNotFound.DeviceNotExist The device does not exist.
ResourceNotFound.ProductNotExist The product does not exist.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback