<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to RetrieveByAttribute</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/</link><description>Recent changes to RetrieveByAttribute</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/feed" rel="self"/><language>en</language><lastBuildDate>Tue, 27 Oct 2020 08:28:22 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/feed" rel="self" type="application/rss+xml"/><item><title>RetrieveByAttribute modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -15,6 +15,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:28:22 -0000</pubDate><guid>https://sourceforge.netf380ae36653a2d14a901e6c1295508b1a766978e</guid></item><item><title>RetrieveByAttribute modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -24,7 +24,7 @@
 Example

 ~~~~~~
-GET http://localhost/cs-ws/resources/retrieval/attribute/?direction=asc&amp;amp;count=false&amp;amp;
+GET http://localhost/cs-ws/resources/retrieval/attribute?direction=asc&amp;amp;count=false&amp;amp;
 to=2012-08-31%2023%3A59%3A59.000&amp;amp;from=2012-08-31%2017%3A55%3A54.036&amp;amp;
 device_name=TempDev2&amp;amp;limit=-1&amp;amp;apikey=1234&amp;amp;attribute_name=Temperature&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:28:25 -0000</pubDate><guid>https://sourceforge.netfddd45d4a2297d8c6f3f9c5bb1f42990adc88eee</guid></item><item><title>WikiPage RetrieveByAttribute modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByAttribute/</link><description>### Retrieve Data by Attribute ###

Returns stored device data for one attribute of a sensor of a device

Path: cs-ws/resources/retrieval/attribute        Method: GET

Parameters

* apikey
* device_name
* sensor_name
* attribute_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 or attribute is not found

Example

~~~~~~
GET http://localhost/cs-ws/resources/retrieval/attribute/?direction=asc&amp;count=false&amp;
to=2012-08-31%2023%3A59%3A59.000&amp;from=2012-08-31%2017%3A55%3A54.036&amp;
device_name=TempDev2&amp;limit=-1&amp;apikey=1234&amp;attribute_name=Temperature&amp;
sensor_name=TemperatureSensor HTTP/1.1

HTTP/1.1 200 OK
&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;
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 08:48:27 -0000</pubDate><guid>https://sourceforge.net435326156b7564960db4dc873acdbafb75e8f372</guid></item></channel></rss>