<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to RetrieveByDeviceModel</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByDeviceModel/</link><description>Recent changes to RetrieveByDeviceModel</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveByDeviceModel/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 23 Sep 2012 09:01:51 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveByDeviceModel/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage RetrieveByDeviceModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveByDeviceModel/</link><description>### Retrieve Data by Device Model ###

Returns stored device data for all sensors of all devices of a certain device model

Path: cs-ws/resources/retrieval/devicelist/{devicemodel_name}        Method: GET

Parameters

* apikey
* devicemodel_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 of the devices is not found

Example

~~~~~~
GET http://localhost/cs-ws/resources/retrieval/devicelist/TemperatureDevice?direction=asc&amp;
count=false&amp;to=2012-09-01%2001%3A00%3A00.000&amp;from=2012-08-31%2001%3A00%3A00.000&amp;limit=-1&amp;
apikey=1234 HTTP/1.1


HTTP/1.1 200 OK
&lt;devices&gt;
   &lt;device&gt;
      &lt;name&gt;Dev999&lt;/name&gt;
      &lt;sensor&gt;
         &lt;attribute&gt;
            &lt;name&gt;Temperature&lt;/name&gt;
            &lt;result&gt;
               &lt;count&gt;0&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;
   &lt;/device&gt;
   &lt;device&gt;
      &lt;name&gt;TempDev2&lt;/name&gt;
      &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;
   &lt;/device&gt;
&lt;/devices&gt;
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 09:01:51 -0000</pubDate><guid>https://sourceforge.netfa431f74fe45b9bcc5d0483a2e9ec70a865d045d</guid></item></channel></rss>