多協議接入 產品介紹 快速入門 用戶指南 開發指南
EDP TCP透傳 MQTT Modbus HTTP
常見問題

新增數據流

請求方式:POST

URL: http://api.onenet.hk.chinamobile.com/devices/device_id/datastreams

device_id:需要替換為設備lD

http body參數

參數名稱 格式 是否必須 說明
id string 數據流ID,即數據流名稱
tags array-string 數據流標籤,可為一個或者多個
unit string 數據單位
unit_symbol string 數據單位符號

返回參數

參數名稱 格式 說明
errno int 調用錯誤碼,為0表示調用成功
error string 錯誤描述,為“succ”表示調用成功
data json 介面調用成功之後返回的設備相關信息,見data描述表

data描述表

參數名稱 格式 說明
ds_uuid string 數據流平台內部唯一ID

請求頭部示例

P0ST http://api.onenet.hk.chinamobile.com/devices/20474930/datastreams HTTP/1.1

請求body示例

{
    "id": "speed",
    "tags": ["mobile"],
    "unit": "m/s",
    "unit_symbol": "m/s"
}

返回示例

{
    "errno": 0,
    "data": {
        "ds_uuid": "856f8622-64e7-5549-8e55-44931f07db6e"
    },
    "error": "succ"
}

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “