<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to RetrieveEventByDevice</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveEventByDevice/</link><description>Recent changes to RetrieveEventByDevice</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveEventByDevice/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 04 Jan 2018 11:01:27 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveEventByDevice/feed" rel="self" type="application/rss+xml"/><item><title>RetrieveEventByDevice modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveEventByDevice/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Retrieve Events by Device&lt;br/&gt;
Returns stored event data for a device&lt;/p&gt;
&lt;p&gt;Path: cs-ws/resources/retrieval/eventlist Method: GET&lt;/p&gt;
&lt;p&gt;Parameters&lt;/p&gt;
&lt;p&gt;apikey&lt;br/&gt;
device_name&lt;br/&gt;
model_name&lt;br/&gt;
from ... timestamp as yyyy-mm-dd hh:hh:ss.SSS&lt;br/&gt;
to ... timestamp as yyyy-mm-dd hh:hh:ss.SSS&lt;br/&gt;
direction ...=asc|desc: controls whether timestamped data are retrieved in ascending or descending order, ascending is default&lt;br/&gt;
count ...=true: retrieves only the number of retrieved moments, not the moments themselves&lt;br/&gt;
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&lt;br/&gt;
filter: &amp;lt;EventAttribute&amp;gt; &amp;lt;Operator&amp;gt; &amp;lt;Value&amp;gt;&lt;br/&gt;
Errors:&lt;/p&gt;
&lt;p&gt;401 UNAUTHORIZED if key is invalid&lt;br/&gt;
404 NOT FOUND if the device is not found&lt;br/&gt;
Example&lt;/p&gt;
&lt;p&gt;GET &lt;a href="http://localhost/cs-ws/resources/retrieval/eventlist?apikey=1234&amp;amp;model_name=EvModel1&amp;amp;device_name=Test1&amp;amp;filter=EvAttr1%20EQ%20123" rel="nofollow"&gt;http://localhost/cs-ws/resources/retrieval/eventlist?apikey=1234&amp;amp;model_name=EvModel1&amp;amp;device_name=Test1&amp;amp;filter=EvAttr1%20EQ%20123&lt;/a&gt; HTTP/1.1&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;HTTP/1.1 200 OK
&lt;span class="nt"&gt;&amp;lt;events&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;event&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;attribute&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;EvAttr1&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;value&amp;gt;&lt;/span&gt;123&lt;span class="nt"&gt;&amp;lt;/value&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;attribute&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;name&amp;gt;&lt;/span&gt;EvAttr2&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;rawdata&amp;gt;&lt;/span&gt;this is the raw data&lt;span class="nt"&gt;&amp;lt;/rawdata&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;timestamp&amp;gt;&lt;/span&gt;2017-12-04 12:10:30.123&lt;span class="nt"&gt;&amp;lt;/timestamp&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/event&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;result&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;count&amp;gt;&lt;/span&gt;1&lt;span class="nt"&gt;&amp;lt;/count&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;limit_reached&amp;gt;&lt;/span&gt;false&lt;span class="nt"&gt;&amp;lt;/limit_reached&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;next_timestamp&amp;gt;&amp;lt;/next_timestamp&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/result&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/events&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Thu, 04 Jan 2018 11:01:27 -0000</pubDate><guid>https://sourceforge.netdb19c469856221b0691944a5059655277eeb04ae</guid></item></channel></rss>