获取设备绑定信息

2022-07-07
暂无评分

设备请求:获取设备是否已经绑定到某个组织

Topic:

thing/product/{pid}/requests

参数说明:

参数必填类型说明
tidYstring
bidYstring
methodYstringmessage类型
timestampYint13位时间戳
dataYobject
» devicesYarray<device>Y
»» snYstring设备序列号

示例:

// topic thing/product/{pid}/requests
{
  "method":"airport_bind_status",
  "bid":"08f3ec6b-77b4-49fb-a83e-4ef85a20c93f",
  "tid":"2f609e97-5413-45d5-8b97-75bbc9fd64fc",
  "timestamp":1654070968655,
  "data":{
    "devices":[
      {
        "sn":"drone-sn"
      },
      {
        "sn":"dock-sn"
      }
    ]
  }
}

参数说明:

参数必填类型说明
tidYstring
bidYstring
methodYstringmessage类型
timestampYint13位时间戳
dataYobject
» resultYint响应结果0代表正常
» outputYobject输出
»» bind_statusYarray<bind_status>组织绑定状态数组
»»» snYstring设备序列号
»»» is_device_bind_organizationYbool设备是否绑定到组织
»»» organization_idYstring设备被绑定的组织id
»»» organization_nameYstring设备被绑定的组织名称
»»» device_callsignYstring设备组织callsign

云端响应: 获取设备是否已经绑定到某个组织

Topic:

// topic thing/product/{pid}/requests_reply
{
  "method":"airport_bind_status",
  "tid":"123",
  "bid":"456",
  "timestamp":"1234567890123",
  "data":{
    "result":0,
    "output":{
      "bind_status":[
        {
          "sn":"210-1",
          "is_device_bind_organization":true,
          "organization_id":"12345678",
          "organization_name":"ES310一组",
          "device_callsign":"设备组织callsign"
        },
        {
          "sn":"210-2",
          "is_device_bind_organization":true,
          "organization_id":"12345678",
          "organization_name":"ES310一组",
          "device_callsign":"设备组织callsign"
        }
      ]
    }
  }
}