Skip to content

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 NameParameter DescriptionRequest TypeRequiredData TypeSchema
deviceIdDevice 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 precedencequeryfalseinteger(int64)
deviceKeyDevice 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 precedencequeryfalsestring
languageLanguage: CN/EN (default: CN)queryfalsestring
pageNumPage number (default: 1)queryfalseinteger(int32)
pageSizePage size, number of items per page (default: 10)queryfalseinteger(int32)
productKeyProduct 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 precedencequeryfalsestring

Response Status:

Status CodeDescriptionSchema
200OKActionResultOfListOfOpenApiDeviceDO
401Unauthorized
403Forbidden
404Not Found
50000Service exception
50005Parameter check error
50007The deviceID, productKey or deviceKey is empty
70000Hub service unavailable
70020Not a gateway product
70089You have limited permission to operate this project or product or device
91001Token does not exist
91004Token incorrect
91005Doesn't have permission
91006User not in IP white list
91007Please enable API permission

Response Parameters:

Parameter NameParameter DescriptionTypeSchema
codeReturn codeobject
dataObjectarrayOpenApiDeviceDO
  activedTimeActivation timeinteger(int64)
  authModeAuthentication method, 0-Dynamic authentication 1-Static authentication, 2-X509 authentication, default 0integer(int32)
  createTimeCreation timeinteger(int64)
  deviceKeyDevice keystring
  deviceNameDevice namestring
  deviceStatusDevice statusinteger(int32)
  enabledWhether enabled: 0-Enabled, 1-Disabled, default enabledinteger(int32)
  fingerPrintDevice certificate fingerprintstring
  firstConnTimeFirst connection timestring(date-time)
  gatewayTypeGateway authorization type: Default 0-Direct connection/No gateway, 1-Only proxy internet access, 2-Product integrationinteger(int32)
  idDevice IDinteger(int64)
  isActivedWhether activated: 0-Not activated, 1-Activatedinteger(int32)
  isLivenessWhether active: 0-Not active, 1-Activeinteger(int32)
  isVerifiedWhether to allow secondary authentication: 0-No, 1-Yesinteger(int32)
  isVirtualWhether virtual device: 0-Real, 1-Virtualinteger(int32)
  lastConnTimeLast online timestring(date-time)
  lastOfflineTimeLast offline timestring(date-time)
  locateTypeDevice location typestring
  moduleTypeDevice modelstring
  moduleVersionDevice versionstring
  oldDeviceNamestring
  productIdProduct IDinteger(int64)
  productKeyProduct keystring
  productNamestring
  projectIdinteger(int64)
  protocolDefault value 0, access protocol: 1:mqtt, 2:lwm2m/coap, 3:httpinteger(int32)
  updateTimeUpdate timeinteger(int64)
exp1string
msgPrompt messageobject
pageNumCurrent page numberobject
pageSizeItems per pageobject
pagesTotal pagesobject
totalTotal countobject

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": {}
}