List All Triggers

Retrieves a list of all triggers for the authenticated account or a filtered list of only the triggers for a specified Feed.

Note:

  • The data for a trigger read can only be encoded as xml or json, not csv.

A full list of trigger parameters is available on the API Resource Attributes page.

Parameters

The following optional parameter can be applied to filter the returned triggers:

Parameter Description Example
Feed_id Filter the returned triggers to include only those on Datastreams of the specified Feed. https://api.xively.com/v2/triggers?feed_id=123

Example filtered by FEED_ID

Request

Parameters
Method GET
Base URL https://api.xively.com
API Endpoint /v2/triggers
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • GET/v2/triggers.json?feed_id=FEED_ID_HERE

    This request does not require body data
    
  • GET/v2/triggers.xml?feed_id=FEED_ID_HERE

    This request does not require body data
    
  • CSV format not available for this call
    

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • [
        {
            "id": 21961,
            "url": "http://requestb.in/131tsul1",
            "trigger_type": "lt",
            "user": "USERNAME",
            "environment_id": 121601,
            "stream_id": "example",
            "threshold_value": "15.0",
            "notified_at": "2013-05-06T20:08:17Z"
        },
        {
            "id": 21962,
            "url": "http://requestb.in/131tsul1",
            "trigger_type": "lt",
            "user": "USERNAME",
            "environment_id": 121601,
            "stream_id": "example",
            "threshold_value": "15.0",
            "notified_at": "2013-05-06T20:08:17Z"
        },
        {
            "id": 21955,
            "url": "http://requestb.in/131tsul1",
            "trigger_type": "change",
            "user": "USERNAME",
            "environment_id": 121601,
            "stream_id": "example",
            "notified_at": "2013-05-06T20:08:17Z"
        }
    ]
    
  • <?xml version="1.0" encoding="UTF-8"?>
    <datastream-triggers type="array">
       <datastream-trigger>
       <id type="integer">21961</id>
       <url>http://requestb.in/131tsul1</url>
       <trigger-type>lt</trigger-type>
       <threshold-value type="float">15.0</threshold-value>
       <notified-at type="datetime">2013-05-06T20:08:17Z</notified-at>
       <user>calumbarnes</user>
       <environment-id type="integer">121601</environment-id>
       <stream-id>example</stream-id>
       </datastream-trigger>
       <datastream-trigger>
       <id type="integer">21962</id>
       <url>http://requestb.in/131tsul1</url>
       <trigger-type>lt</trigger-type>
       <threshold-value type="float">15.0</threshold-value>
       <notified-at type="datetime">2013-05-06T20:08:17Z</notified-at>
       <user>calumbarnes</user>
       <environment-id type="integer">121601</environment-id>
       <stream-id>example</stream-id>
       </datastream-trigger>
       <datastream-trigger>
       <id type="integer">21955</id>
       <url>http://requestb.in/131tsul1</url>
       <trigger-type>change</trigger-type>
       <notified-at type="datetime">2013-05-06T20:08:17Z</notified-at>
       <user>calumbarnes</user>
       <environment-id type="integer">121601</environment-id>
       <stream-id>example</stream-id>
       </datastream-trigger>
    </datastream-triggers>
    
  • CSV format not available for this call