Update Trigger

Updates an existing trigger object.

Notes:

  • “TRIGGER_ID” should be set to the ID of the trigger you want to update.
  • All of the trigger parameters except for “environment_id” and “stream_id” can be updated.
  • 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.

Request

Parameters
Method PUT
Base URL https://api.xively.com
API Endpoint /v2/triggers/TRIGGER_ID
Headers
X-ApiKey API_KEY_HERE
Body
JSON
XML
CSV
  • PUT/v2/triggers/TRIGGER_ID.json

    {
      "trigger_type":"gt",
      "url":"http://requestb.in/vj5hzgvj",
      "threshold_value":"10.0"
    }
    
  • PUT/v2/triggers/TRIGGER_ID.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <datastream-trigger>
      <url>http://requestb.in/vj5hzgvj</url>
      <trigger-type>gt</trigger-type>
      <threshold-value type="float">15.0</threshold-value>
    </datastream-trigger>
    
  • CSV format not available for this call
    

Response

Parameters
Status Code 200 OK
Headers
No Headers
Body
JSON
XML
CSV
  • This response does not return body data
    
  • This response does not return body data
    
  • CSV format not available for this call