OneNET IoT Platform Platform Introduction Introduction Manual Guidline for Device Development Guideline for Application Development
API
API Usage API List SDK MQTT LwM2M EDP Modbus TCP
HTTP Push

# Update Trigger

Request Method: PUT

URL: http://iot.zong.com.pk:8000/triggers/trigger_id

trigger_id: need to be replaced with a trigger ID

http body Parameter

Parameter Name Format Required Description
title string no trigger name
ds_id string yes datastream name
dev_ids array-string no device ID, default to all devices by default
url string no alarm notification address
type string no trigger condition, see type description list
threshold No trigger condition threshold, used coordinating with type, see type description list
type Description List
Type escription
> threshold must be numberic value
< threshold must be numberic value
>= threshold must be numberic value
<= threshold must be numberic value
inout threshold is set to {"lolmt":40, "uplmt":52}, indicates that to trigger when the data value is entering or leaving the closed interval [40, 52]
in threshold is set to {"lolmt":40, "uplmt":52}, indicates that to trigger when the data value is entering the closed interval [40, 52]
out threshold is set to {"lolmt":40, "uplmt":52}, indicates that to trigge when the data value is leaving the closed interval [40, 52]
change threshold parameter does not need to be passed; to trigger an alarm when the uploaded value changes
frozen threshold is numberic value that specifies triggering an alarm after how many seconds to report data, and the monitored object enters the frozen stattus
live threshold is numberic value, specifies after how many seconds to update data to trigger an alarm.

Return Parameter

Parameter Name Format Description
errno int code for call error, 0 indicates call is successful
error string error description, "succ" indicates call is successful

Example of Request Header

PUT http://iot.zong.com.pk:8000/triggers/145709 HTTP/1.1
api-key: YHC**************VqKA=
Host: iot.zong.com.pk:8000

Example of Request Parameter

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

Example of Return

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

results matching ""

    No results matching ""