Write Multiple Datapoints to Each 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":"41"},
            {"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" : "333"
        },
        { 
        "id" : "key",
            "datapoints":[
          {"at":"2013-04-22T00:35:43Z","value":"revalue"},
            {"at":"2013-04-22T00:55:43Z","value":"string value"},
            {"at":"2013-04-22T01:15:43Z","value":"any string"},
            {"at":"2013-04-22T01:35:43Z","value":"structured data"}
            ],
        "current_value" : "value"      
        },
        { 
          "id" : "datastream",
            "datapoints":[
          {"at":"2013-04-22T00:35:43Z","value":"51"},
            {"at":"2013-04-22T00:55:43Z","value":"102"},
            {"at":"2013-04-22T01:15:43Z","value":"32"},
            {"at":"2013-04-22T01:35:43Z","value":"16"}
            ],
        "current_value" : "1337"
        }
      ]
    }
    
  • PUT/v2/feeds/FEED_ID_HERE.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <eeml>
      <environment>
          <data id="example">
          <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>
          <current_value>333</current_value>
        </data>
          <data id="key">
          <datapoints>
             <value at="2013-04-22T00:35:43Z">revalue</value>
             <value at="2013-04-22T00:55:43Z">string value</value>
             <value at="2013-04-22T01:15:43Z">any string</value>
             <value at="2013-04-22T01:35:43Z">{structured data}</value>
         </datapoints>
          <current_value>val</current_value>
        </data>
          <data id="datastream">
          <datapoints>
             <value at="2013-04-22T00:35:43Z">51</value>
             <value at="2013-04-22T00:55:43Z">102</value>
             <value at="2013-04-22T01:15:43Z">32</value>
             <value at="2013-04-22T01:35:43Z">16</value>
         </datapoints>
          <current_value>1337</current_value>
        </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
    key,2013-04-22T00:35:43Z,revalue
    key,2013-04-22T00:55:43Z,any string
    key,2013-04-22T01:15:43Z,string value
    key,2013-04-22T01:35:43Z,structured data
    datastream,2013-04-22T00:35:43Z,51
    datastream,2013-04-22T00:55:43Z,102
    datastream,2013-04-22T01:15:43Z,32
    datastream,2013-04-22T01:35:43Z,16
    

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