<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to RetrieveBySensor</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/</link><description>Recent changes to RetrieveBySensor</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 27 Oct 2020 08:27:50 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/feed" rel="self" type="application/rss+xml"/><item><title>RetrieveBySensor modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -14,6 +14,8 @@
 * direction ...=asc|desc: controls whether timestamped data are retrieved in ascending or descending order, ascending is default
 * count ...=true: retrieves only the number of retrieved moments, not the moments themselves
 * limit ...=nnn: only up to nnn moments are retrieved. If a limit is reached for a moment series the response contains an element &amp;lt;next_timestamp&amp;gt; which can be used in a continuation of the retrieval for this time series
+*  rollupLength: the length of the rollup interval in minutes, default is 0 meaning no rollup performed
+* rollupOp: the operation to performed, one of AVG | SUM | MIN | MAX, default is AVG

 Errors:

&amp;lt;/next_timestamp&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Tue, 27 Oct 2020 08:27:50 -0000</pubDate><guid>https://sourceforge.netb62f4312e043d31571022d86fdabfac18d6ad4db</guid></item><item><title>RetrieveBySensor modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -23,7 +23,7 @@
 Example

 ~~~~~~
-GET http://localhost/cs-ws/resources/retrieval/sensor/?direction=asc&amp;amp;count=false&amp;amp;
+GET http://localhost/cs-ws/resources/retrieval/sensor?direction=asc&amp;amp;count=false&amp;amp;
 to=2012-09-01%2001%3A00%3A00.000&amp;amp;from=2012-08-31%2001%3A00%3A00.000
 &amp;amp;device_name=TempDev2&amp;amp;limit=-1&amp;amp;apikey=1234&amp;amp;sensor_name=TemperatureSensor HTTP/1.1

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Tue, 05 Dec 2017 21:27:40 -0000</pubDate><guid>https://sourceforge.netefc736adf5208a496900f52c5b8e109de6376353</guid></item><item><title>WikiPage RetrieveBySensor modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveBySensor/</link><description>### Retrieve Data by Sensor ###

Returns stored device data for one sensor of a device

Path: cs-ws/resources/retrieval/sensor        Method: GET

Parameters

* apikey
* device_name
* sensor_name
* from ... timestamp as yyyy-mm-dd hh:hh:ss.SSS
* to ... timestamp as yyyy-mm-dd hh:hh:ss.SSS
* direction ...=asc|desc: controls whether timestamped data are retrieved in ascending or descending order, ascending is default
* count ...=true: retrieves only the number of retrieved moments, not the moments themselves
* limit ...=nnn: only up to nnn moments are retrieved. If a limit is reached for a moment series the response contains an element &lt;next_timestamp&gt; which can be used in a continuation of the retrieval for this time series

Errors:

* 401 UNAUTHORIZED if key is invalid
* 404 NOT FOUND if the device or sensor is not found

Example

~~~~~~
GET http://localhost/cs-ws/resources/retrieval/sensor/?direction=asc&amp;count=false&amp;
to=2012-09-01%2001%3A00%3A00.000&amp;from=2012-08-31%2001%3A00%3A00.000
&amp;device_name=TempDev2&amp;limit=-1&amp;apikey=1234&amp;sensor_name=TemperatureSensor HTTP/1.1

HTTP/1.1 200 OK
&lt;sensor&gt;
   &lt;attribute&gt;
      &lt;moment&gt;
         &lt;timestamp&gt;2012-08-31 19:55:54.036&lt;/timestamp&gt;
         &lt;value&gt;1.1&lt;/value&gt;
      &lt;/moment&gt;
      &lt;moment&gt;
         &lt;timestamp&gt;2012-08-31 19:58:54.036&lt;/timestamp&gt;
         &lt;value&gt;1.1&lt;/value&gt;
      &lt;/moment&gt;
      &lt;name&gt;Temperature&lt;/name&gt;
      &lt;result&gt;
         &lt;count&gt;2&lt;/count&gt;
         &lt;limit_reached&gt;false&lt;/limit_reached&gt;
         &lt;next_timestamp/&gt;
      &lt;/result&gt;
   &lt;/attribute&gt;
   &lt;name&gt;TemperatureSensor&lt;/name&gt;
&lt;/sensor&gt;
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 08:41:22 -0000</pubDate><guid>https://sourceforge.netb97e27254e8c2adb21bc7a1c3016a2a070210343</guid></item></channel></rss>