Skip to content

Query Current Gateway by Sub-Device

API Address:/v2/devicemgr/r1/openapi/product/gateway/getGatewayProductByChildDevice

Request Method:GET

Request Data Type:application/x-www-form-urlencoded

Response Data Type:*/*

API Description:Query gateway information based on sub-device (only returns information of the currently connected gateway)

Request Parameters:

Parameter NameParameter DescriptionRequest TypeRequiredData TypeSchema
deviceKeyDevice deviceKey (required)querytruestring
productKeyProduct productKey (required)querytruestring
languageLanguage: CN/EN (default: CN)queryfalsestring

Response Status:

Status CodeDescriptionSchema
200OKActionResultOfOpenApiGatewayProductInfo
401Unauthorized
403Forbidden
404Not Found
50000Service exception
50005Parameter check error
50007The deviceID, productKey or deviceKey is empty
70000Hub service unavailable
70026The sub-device is not connected to the gateway device
70027Not a product of product integration
70028There is no associated gateway device
70029Not a sub-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
dataObjectOpenApiGatewayProductInfoOpenApiGatewayProductInfo
  deviceKeyAssociated gateway device DKstring
  deviceNameAssociated gateway device namestring
  productKeyAssociated gateway product PKstring
  productNameAssociated gateway product namestring
exp1string
msgPrompt messageobject
pageNumCurrent page numberobject
pageSizeItems per pageobject
pagesTotal pagesobject
totalTotal countobject

Response Example:

javascript
{
	"code": {},
	"data": {
		"deviceKey": "",
		"deviceName": "",
		"productKey": "",
		"productName": ""
	},
	"exp1": "",
	"msg": {},
	"pageNum": {},
	"pageSize": {},
	"pages": {},
	"total": {}
}