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

更新觸發器

請求方式:PUT

URL: http://api.onenet.hk.chinamobile.com/triggers/trigger_id

trigger_id:需要替換為觸發器lD

http body參數

參數名稱 格式 是否必須 說明
title string 觸發器名稱
ds_id string 數據流名稱
dev_ids array-string 設備ID,缺省時預設為全部設備
url string 告警通知地址
type string 觸發條件,見type說明列表
threshold 觸發條件門限值,與type配合使用,見type說明列表

type說明列表

type 說明
> threshold必須為數值
\< threshold必須為數值
>= threshold必須為數值
\<= threshold必須為數值
inout threshold設置為{“lolmt”:40,”uplmt”:52},表示數據值進入或離開閉區間[40,52]時觸發
in threshold設置為{“lolmt”:40,”uplmt”:52},表示數據值進入閉區間[40,52]時觸發
out threshold設置為{“lolmt”:40,”uplmt”:52},表示數據值離開閉區間[40,52]時觸發
change threshold 參數不用傳遞;當上載的值有改變時觸發告警
frozen threshold 為數值,指定多少秒內未上報數據觸發告警,同時被監控物件進入frozen狀態
live threshold為數值,指定多少秒後上報數據觸發告警

返回參數

參數名稱 格式 說明
errno int 調用錯誤碼,為0表示調用成功
error string 錯誤描述,為“succ”表示調用成功

請求頭部示例

PUT http://api.onenet.hk.chinamobile.com/triggers/145709 HTTP/1.1 api-key: YHC**************VqKA=

Host: api.onenet.hk.chinamobile.com

請求參數示例

{
    "title": "trigger",
    "ds_id": "gps",
    "url": "http://aoic.choqf.com",
    "type": ">",
    "threshold": 100
}

返回示例

{
    "errno":0,
    "error":"succ"
}

个搜索结果,搜索内容 “

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