Query a Specific Device
Query the detailed information of a specific device.
Request URL
GET {base_url}/device/openapi/v1/devices/{deviceId}
Request Parameters
Parameter | Required | Type | Description |
---|---|---|---|
Authorization | Yes | String | The valid access token for making API calls. The format should be Bearer {access_token}. |
Parameter | Required | Type | Description |
---|---|---|---|
deviceId | Yes | Long | The unique ID of this device, which is returned when you add
the device. Note: If you did NOT save the
deviceID, you can query the device's ID using Search Specific Devices.
|
Response Parameters
Parameter | Type | Description |
---|---|---|
data | Object<Device_Info> | Detailed information of the queried device. |
status | String | The result of the API request.
|
requestId | String | The unique ID of the request, which can be used to quickly locate the request. |
- Device_Info
-
Parameter Type Description sn String The SN (Serial Number) of this device. imei String The IMEI (International Mobile Equipment Identity) of this device. autopStatus String The auto provisioning status of the device. SUCCESS
: The device has been auto-provisioned successfully.WAITING
: The device is waiting to be auto-provisioned.DISABLE
: Auto provisioning is disabled for this device.
name String The device name. model String The device model. hardwareVersion String The hardware version of the device. firmwareVersion String The firmware version of the device. electricity Integer The battery level of the device. lastUpdateTime Long The timestamp of the device's most recent report. application Object Information of the device's associated Application. applicationId Long The unique ID of this Application. applicationName String Name of this Application. project String The device's project tag. description String The device description. deviceId Long The unique ID of this device. devEUI String The EUI (Extended Unique Identifier) of this device. connectStatus String The connectivity status of the device. ONLINE
: The device is actively connected to Milesight Development Platform.OFFLINE
: The device is NOT currently connected to Milesight Development Platform.DISCONNECT
: The device is disconnected from Milesight Development Platform.
licenseStatus String The license status of the device. VALID
: The device can be used.INVALID
: The device is banned after the pro plan expires.
deviceType String The type of this device. GATEWAY
: The gateway device to set up communication between sub devices and Milesight Development Platform.SUB_DEVICE
: The Internet inaccessible device which needs gateway to connect to Milesight Development Platform.COMMON
: The Internet accessible device which is able to connect to Milesight Development Platform directly.
tag Array<String> The tags of this device.
Examples
- Request example
- Query the detailed information of the device with ID "1739930666380779522"
- Response example
-
HTTP/1.1 200 OK { "data": { "sn": "6791D1970467xxxx", "autopStatus": "DISABLE", "name": "Demo Device", "model": "WS203", "hardwareVersion": "v1.0", "firmwareVersion": "v1.1", "electricity": 97, "lastUpdateTime": 1704172785337, "application": { "applicationId": "1734475086466600962", "applicationName": "Demo" }, "project": "Demo", "description": "Demo", "deviceId": "1739930666380779522", "devEUI": "24E124791D1xxxx", "connectStatus": "ONLINE" }, "status": "Success", "requestId": "c15d037ea4c74565ecced1725c8d46d6" }