Write Multiple Datapoints to Single Datastream

Request

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

    {
      "version":"1.0.0",
       "datastreams" : [ {
            "id" : "example",
            "datapoints":[
            {"at":"2013-04-22T00:35:43Z","value":"42"},
            {"at":"2013-04-22T00:55:43Z","value":"84"},
            {"at":"2013-04-22T01:15:43Z","value":"41"},
            {"at":"2013-04-22T01:35:43Z","value":"83"}
            ],
            "current_value" : "40"
        }
      ]
    }
    
  • PUT/v2/feeds/FEED_ID_HERE.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <eeml>
      <environment>
          <data id="example">
          <current_value>333</current_value>
          <datapoints>
             <value at="2013-04-22T00:35:43Z">42</value>
             <value at="2013-04-22T00:55:43Z">84</value>
             <value at="2013-04-22T01:15:43Z">41</value>
             <value at="2013-04-22T01:35:43Z">83</value>
         </datapoints>
        </data>
      </environment>
    </eeml>
    
    
  • PUT/v2/feeds/FEED_ID_HERE.csv

    example,2013-04-22T00:35:43Z,42
    example,2013-04-22T00:55:43Z,84
    example,2013-04-22T01:15:43Z,41
    example,2013-04-22T01:35:43Z,83
    

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
    
  • This response does not return body data