功能介绍

设备平台通过设备分发实现设备跨站点的接入。设备可在不同地域,向设备平台请求需要接入的域名和端口,从而使用该信息,免去二次烧录设备信息。本文介绍设备端如何通过设备分发功能连接设备平台。

接口文档

简要描述

  • 设备域名分发接口

接口版本

版本号 制定人 制定日期 修订日期
1.0.0 段忠红 2023-04-10 xxxx-xx-xx

请求URL

请求方式

  • GET

请求参数

参数名 是否必须 类型 说明
product_id string 产品id
device_id string 设备id

返回示例

正确时返回:

{
    "code": 0,
    "msg": "ok",
    "err_code": 10000,
    "result": {
        "device_auth_url": "https://cn-sweeper.narwaltech.com",
        "device_mqtt_url": "mqtts://cn-mqtt.narwaltech.com",
        "device_ws_url": "",
        "open_platform_server_url": "https://cn-open.narwaltech.com",
        "device_bootstrap_url": "https://iot-auth-global.narwaltech.com/device-bootstrap-server/v1/bootstrap",
        "dynamic_url_config": {
            "device_business_url": "https://cn-sweeper.narwaltech.com"
        }
    }
}

错误时返回:

{
    "code": -1,
    "msg": "params error"
}

返回参数说明

参数名 类型 说明
device_auth_url string 设备认证域名
device_mqtt_urll string 设备MQTT域名
open_platform_server_urll string 开放平台域名
device_bootstrap_url string 域名分发域名
dynamic_url_config object 动态配置域名(Map<string, string>), 内含设备业务域名(device_business_url)。配置方法详见:配置额外的域名地址配置
 创建时间:2023-03-23 21:35
最后编辑:陈勇琦  更新时间:2024-10-18 10:58