跳到主要内容

组织管理

Requests

获取设备绑定信息

Topic: thing/product/{gateway_sn}/requests

Direction: up

Method: airport_bind_status

Data:

ColumnNameTypeconstraintDescription
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:

ColumnNameTypeconstraintDescription
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组织 IDtext
»»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:

ColumnNameTypeconstraintDescription
device_binding_code设备绑定码text
organization_id组织 IDtext

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:

ColumnNameTypeconstraintDescription
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:

ColumnNameTypeconstraintDescription
bind_devices绑定参数列表array{"size": 2, "item_type": struct}
»device_binding_code设备绑定码text
»organization_id组织 IDtext
»device_callsign设备在组织中的名称text
»sn设备序列号(SN)text
»device_model_key产品枚举值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:

ColumnNameTypeconstraintDescription
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"
}