Appearance
Query Sub-Devices Under Gateway
API Address:/v2/devicemgr/r1/openapi/product/gateway/subList
Request Method:GET
Request Data Type:application/x-www-form-urlencoded
Response Data Type:*/*
API Description:Query sub-devices associated with gateway device
Request Parameters:
Parameter Name | Parameter Description | Request Type | Required | Data Type | Schema |
---|---|---|---|---|---|
deviceId | Device ID, corresponds one-to-one with the productKey and deviceKey combination. If deviceId is provided, productKey and deviceKey combination is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | false | integer(int64) | |
deviceKey | Device Key. If deviceKey is provided, productKey must also be provided. The combination of productKey and deviceKey corresponds one-to-one with deviceId. If productKey and deviceKey combination is provided, deviceId is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | false | string | |
language | Language: CN/EN (default: CN) | query | false | string | |
pageNum | Page number (default: 1) | query | false | integer(int32) | |
pageSize | Page size, number of items per page (default: 10) | query | false | integer(int32) | |
productKey | Product Key. If productKey is provided, deviceKey must also be provided. The combination of productKey and deviceKey corresponds one-to-one with deviceId. If productKey and deviceKey combination is provided, deviceId is not needed. If you provide both deviceId and the productKey/deviceKey combination, deviceId takes precedence | query | false | string |
Response Status:
Status Code | Description | Schema |
---|---|---|
200 | OK | ActionResultOfListOfOpenApiDeviceDO |
401 | Unauthorized | |
403 | Forbidden | |
404 | Not Found | |
50000 | Service exception | |
50005 | Parameter check error | |
50007 | The deviceID, productKey or deviceKey is empty | |
70000 | Hub service unavailable | |
70020 | Not a gateway product | |
70089 | You have limited permission to operate this project or product or device | |
91001 | Token does not exist | |
91004 | Token incorrect | |
91005 | Doesn't have permission | |
91006 | User not in IP white list | |
91007 | Please enable API permission |
Response Parameters:
Parameter Name | Parameter Description | Type | Schema |
---|---|---|---|
code | Return code | object | |
data | Object | array | OpenApiDeviceDO |
activedTime | Activation time | integer(int64) | |
authMode | Authentication method, 0-Dynamic authentication 1-Static authentication, 2-X509 authentication, default 0 | integer(int32) | |
createTime | Creation time | integer(int64) | |
deviceKey | Device key | string | |
deviceName | Device name | string | |
deviceStatus | Device status | integer(int32) | |
enabled | Whether enabled: 0-Enabled, 1-Disabled, default enabled | integer(int32) | |
fingerPrint | Device certificate fingerprint | string | |
firstConnTime | First connection time | string(date-time) | |
gatewayType | Gateway authorization type: Default 0-Direct connection/No gateway, 1-Only proxy internet access, 2-Product integration | integer(int32) | |
id | Device ID | integer(int64) | |
isActived | Whether activated: 0-Not activated, 1-Activated | integer(int32) | |
isLiveness | Whether active: 0-Not active, 1-Active | integer(int32) | |
isVerified | Whether to allow secondary authentication: 0-No, 1-Yes | integer(int32) | |
isVirtual | Whether virtual device: 0-Real, 1-Virtual | integer(int32) | |
lastConnTime | Last online time | string(date-time) | |
lastOfflineTime | Last offline time | string(date-time) | |
locateType | Device location type | string | |
moduleType | Device model | string | |
moduleVersion | Device version | string | |
oldDeviceName | string | ||
productId | Product ID | integer(int64) | |
productKey | Product key | string | |
productName | string | ||
projectId | integer(int64) | ||
protocol | Default value 0, access protocol: 1:mqtt, 2:lwm2m/coap, 3:http | integer(int32) | |
updateTime | Update time | integer(int64) | |
exp1 | string | ||
msg | Prompt message | object | |
pageNum | Current page number | object | |
pageSize | Items per page | object | |
pages | Total pages | object | |
total | Total count | object |
Response Example:
javascript
{
"code": {},
"data": [
{
"activedTime": 0,
"authMode": 0,
"createTime": 0,
"deviceKey": "",
"deviceName": "",
"deviceStatus": 0,
"enabled": 0,
"fingerPrint": "",
"firstConnTime": "",
"gatewayType": 0,
"id": 0,
"isActived": 0,
"isLiveness": 0,
"isVerified": 0,
"isVirtual": 0,
"lastConnTime": "",
"lastOfflineTime": "",
"locateType": "",
"moduleType": "",
"moduleVersion": "",
"oldDeviceName": "",
"productId": 0,
"productKey": "",
"productName": "",
"projectId": 0,
"protocol": 0,
"updateTime": 0
}
],
"exp1": "",
"msg": {},
"pageNum": {},
"pageSize": {},
"pages": {},
"total": {}
}