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

Check trigger

Skip to check in batch

1.Check singly

Request format: GET

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

Note: trigger_ id needs to be replaced by device ID.

Return Parameters

NameFormatDescription
errnointCall error code, where 0 means success.
error stringError description, where "succ" means success.
datajsonDevice dependent message returned after the interface is successfully invoked; see Data Description Table

Data Description Table

NameFormatDescription
idstringTrigger ID
titlestringTrigger name
urlstringurl
typestringTrigger type
thresholdintTrigger value
invalidboolWhether the trigger is invalid
create_timestringDevice trigger time, Beijing time
Description

Trigger failure means the the data flow or device on which the trigger depends is deleted. In such a case, the trigger won’t effectively trigger an event.

Request Example

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

Return Example

{
    "errno": 0,
    "data": {
        "id":350092,
        "title":"we du jian kong",
        "url":"xx.bb.com",
        "type":">=",
        "threshold":45,
        "invalid":true,
        "create_time":"2018-04-24 10:22:22"
    },
    "error": "succ"
}

2.Check in batch.

Request format:GET

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

http header

Parameter NameFormatRequired?Description
api-keystringYesMasterkey or apikey with the device access permission
Content_TypestringYesapplication/json

Url parameter

Parameter NameFormatRequired?Description
titlestringNoSpecify the trigger name.
pageintNoSpecify the page number.
per_pageintNoSpecify the number of output on each page, 10 by default, at most 100.

Return Parameters

NameFormatDescription
errnointCall error code, where 0 means success.
error stringError description, where "succ" means success.
datajsonDevice dependent message returned after the interface is successfully invoked; see Data Description Table

Data Description Table

NameFormatDescription
total_countintTotal number of triggers
per_pageintDisplay number per page
pageintpage number
triggersarray-jsonThe json array of triggers, see triggers description table

triggers description list

NameFormatDescription
idstringTrigger ID
titlestringTrigger name
urlstringurl
typestringTrigger type
thresholdintTrigger value
invalidboolWhether the trigger is invalid
create_timestringDevice trigger time, Beijing time

Description

Trigger failure means the the data flow or device on which the trigger depends is deleted. In such a case, the trigger won’t effectively trigger an event.

Request Example

GET http://api.heclouds.com/triggers?page=1&per_page=30 HTTP/1.1
api-key: WhI*************v1c=
Content-Type: application/json

Return Example

{
    "errno": 0,
    "data": {
        "total_count": 600,
        "per_page": 30,
        "page": 1,
        "triggers":[
            {
                "id":350092,
                "title":"we du jian kong",
                "url":"xx.bb.com",
                "type":">=",
                "threshold":45,
                "invalid":true,
                "create_time":"2018-04-24 10:22:22" 
            }
            {
                "id":350093,
                "title":"wen du jian kong",
                "url":"xx.bb.com",
                "type":">=",
                "threshold":45,
                "invalid":true,
                "create_time":"2018-04-24 10:22:22" 
            }
            ...
        ]
    },
    "error": "succ"
}

< update trigger

delete trigger >

个搜索结果,搜索内容 “

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