Request format: PUT
URL: http(s)://api.heclouds.com/triggers/{trigger_id}
Note: trigger_d is trigger ID.
I only want to see examples!!!
Parameter Name | Format | Required? | Description |
---|---|---|---|
title | string | No | Trigger name |
ds_id | string | No | Optional, data flow name; the data flow name is composed of {obj_id}_{obj_inst_id}_{res_id} |
dev_ids | array-string | No | Optional, device ID |
ds_uuids | array-string | No | Optional, data flow uuid |
url | string | No | url |
type | string | No | Trigger type |
threshold | int | No | Trigger value |
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;
Name | Format | Description |
---|---|---|
errno | int | Call error code, where 0 means success. |
error | string | Error description, where "succ" means success. |
In order to revise the trigger conditions, type and threshold shall be set simultaneously.
PUT http://api.heclouds.com/triggers/350092 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json
POST data
{
"title":"wen du jian kong ",
"ds_id": "gps",
"url":"http://xx.wd.com",
"type":"<=",
"threshold":60
}
{
"errno": 0,
"error": "succ"
}