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 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 as {"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 trigger when the data value is leaving the closed interval [40, 52]
change threshold parameter does no need to be passed; triggers alarm when the uploaded value changes
frozen threshold is numberic value, that specifies triggering an alarm after how many seconds does not report data, and the monitored object enters the frozen status
live threshold is numberic value, that specifies after how many seconds to report data to trigger 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 ""