OneNET物联网平台 平台介绍 入门手册 设备开发指南 应用开发指南
API
API使用 API列表 API返回码说明 SDK MQTT LwM2M EDP Modbus TCP
消息队列MQ HTTP推送
服务定价 扩展服务 常见问题 发布公告

更新触发器

请求方式:PUT

URL: http://api.heclouds.com/triggers/trigger_id

trigger_id:需要替换为触发器ID

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]时触发
change threshold 参数不用传递;当上传的值有改变时触发告警
frozen threshold 为数值,指定多少秒内未上报数据触发告警,同时被监控对象进入frozen状态
live threshold为数值,指定多少秒后上报数据触发告警

返回参数

参数名称 格式 说明
errno int 调用错误码,为0表示调用成功
error string 错误描述,为"succ"表示调用成功

请求头部示例

PUT http://api.heclouds.com/triggers/145709 HTTP/1.1
api-key: YHC**************VqKA=
Host: api.heclouds.com

请求参数示例

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

返回示例

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

个搜索结果,搜索内容 “

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