Requests
获取设备绑定信息
Topic: thing/product/{gateway_sn}/requests
Direction: up
Method: airport_bind_status
Data:
devices
设备对象集合
array
{"size": 2, "item_type": struct}
»sn
设备序列号(SN)
text
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"devices": [
{
"sn": "drone-sn"
},
{
"sn": "dock-sn"
}
]
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_bind_status"
}Topic: thing/product/{gateway_sn}/requests_reply
Direction: down
Method: airport_bind_status
Data:
result
返回码
int
非 0 代表错误
output
输出
struct
»bind_status
绑定信息
array
{"size": 2, "item_type": struct}
»»sn
设备序列号(SN)
text
»»is_device_bind_organization
设备是否绑定到组织
bool
{"false":"否","true":"是"}
»»organization_id
组织 ID
text
»»organization_name
组织名称
text
»»device_callsign
设备在组织中的名称
text
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"bind_status": [
{
"device_callsign": "设备组织 callsign",
"is_device_bind_organization": true,
"organization_id": "12345678",
"organization_name": "12345",
"sn": "12345"
},
{
"device_callsign": "设备组织 callsign",
"is_device_bind_organization": true,
"organization_id": "12345678",
"organization_name": "12345",
"sn": "12345"
}
]
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_bind_status"
}查询设备绑定对应的组织信息
Topic: thing/product/{gateway_sn}/requests
Direction: up
Method: airport_organization_get
Data:
device_binding_code
设备绑定码
text
organization_id
组织 ID
text
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"device_binding_code": "device_binding_code",
"organization_id": "organization_id"
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_organization_get"
}Topic: thing/product/{gateway_sn}/requests_reply
Direction: down
Method: airport_organization_get
Data:
result
返回码
int
非 0 代表错误
output
输出
struct
»organization_name
组织名称
text
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"organization_name": "organization_name"
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_organization_get"
}设备绑定到组织
Topic: thing/product/{gateway_sn}/requests
Direction: up
Method: airport_organization_bind
Data:
bind_devices
绑定参数列表
array
{"size": 2, "item_type": struct}
»device_binding_code
设备绑定码
text
»organization_id
组织 ID
text
»device_callsign
设备在组织中的名称
text
»sn
设备序列号(SN)
text
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"bind_devices": [
{
"device_binding_code": "device_binding_code",
"device_callsign": "dock-device-callsign",
"device_model_key": "3-1-0",
"organization_id": "organization_id",
"sn": "dock-sn"
},
{
"device_binding_code": "device_binding_code",
"device_callsign": "drone-device-callsign",
"device_model_key": "0-67-0",
"organization_id": "organization_id",
"sn": "drone-sn"
}
]
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_organization_bind"
}Topic: thing/product/{gateway_sn}/requests_reply
Direction: down
Method: airport_organization_bind
Data:
result
返回码
int
非 0 代表错误
output
输出
struct
»err_infos
错误信息
array
{"size": 2, "item_type": struct}
»»sn
设备序列号(SN)
text
»»err_code
错误码
int
Example:
{
"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"data": {
"output": {
"err_infos": [
{
"err_code": 210231,
"sn": "dock-sn"
},
{
"err_code": 210231,
"sn": "drone-sn"
}
]
},
"result": 0
},
"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
"timestamp": 1654070968655,
"method": "airport_organization_bind"
}Last updated