NB-IoT Suite Product Introduction QuickStart User Guide Device Development Guide Application Development Guide Best Practices FAQ Service agreement Update Log

update trigger

Request format: PUT

URL: http(s)://api.heclouds.com/triggers/{trigger_id}

Note: trigger_d is trigger ID.

I only want to see examples!!!

http request parameter

Parameter NameFormatRequired?Description
titlestringNoTrigger name
ds_idstringNoOptional, data flow name; the data flow name is composed of {obj_id}_{obj_inst_id}_{res_id}
dev_idsarray-stringNoOptional, device ID
ds_uuidsarray-stringNoOptional, data flow uuid
urlstringNourl
typestringNoTrigger type
thresholdintNoTrigger value
Parameter description
1. Trigger meaning: when the data point within the specified range meets the trigger condition

2. The trigger has three trigger modes.
   1)If ds_id is separately specified in the request parameter, and other parameters are not included, under the current item, all device data will enter the trigger judgment logic;
   2)If ds_uuids data array is separately specified in the request parameter, only the specified data flows will enter the trigger judgment logic;
   3)If ds_id and dev_ids are specified in the request parameter, only the data flow of the specified devices will enter the trigger judgment logic;

Return Parameters

NameFormatDescription
errnointCall error code, where 0 means success.
error stringError description, where "succ" means success.
Description

In order to revise the trigger conditions, type and threshold shall be set simultaneously.

Example of request header

PUT http://api.heclouds.com/triggers/350092 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json

Request parameter example

POST data
{
    "title":"wen du jian kong ",
    "ds_id": "gps",
    "url":"http://xx.wd.com",
    "type":"<=",
    "threshold":60
}

Return example

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

< new trigger

check trigger >

个搜索结果,搜索内容 “

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