<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to RetrieveCommandByDevice</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/</link><description>Recent changes to RetrieveCommandByDevice</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/feed" rel="self"/><language>en</language><lastBuildDate>Wed, 03 Jan 2018 21:52:56 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/feed" rel="self" type="application/rss+xml"/><item><title>RetrieveCommandByDevice modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -21,7 +21,7 @@
 Example

 ~~~~~~
-GET http://localhost/cs-ws/resources/commands/device/?direction=asc&amp;amp;sentOnly=True&amp;amp;
+GET http://localhost/cs-ws/resources/commands/device?direction=asc&amp;amp;sentOnly=True&amp;amp;
 to=3000-01-01%2001%3A00%3A00.000&amp;amp;from=1970-01-01%2001%3A00%3A00.000&amp;amp;
 device_name=TempDev2&amp;amp;apikey=1234 HTTP/1.1
 HTTP/1.1 200 OK
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Wed, 03 Jan 2018 21:52:56 -0000</pubDate><guid>https://sourceforge.net0d3025d188006ae64a4069158ea2ebc47b0be291</guid></item><item><title>WikiPage RetrieveCommandByDevice modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -24,7 +24,7 @@
 GET http://localhost/cs-ws/resources/commands/device/?direction=asc&amp;sentOnly=True&amp;
 to=3000-01-01%2001%3A00%3A00.000&amp;from=1970-01-01%2001%3A00%3A00.000&amp;
 device_name=TempDev2&amp;apikey=1234 HTTP/1.1
-
+HTTP/1.1 200 OK
 &lt;devices&gt;
    &lt;command&gt;
       &lt;activation_time&gt;2012-08-31 22:56:54.036&lt;/activation_time&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 10:20:58 -0000</pubDate><guid>https://sourceforge.netfd82e6403f303b678faa409be915e12c1170dcab</guid></item><item><title>WikiPage RetrieveCommandByDevice modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/RetrieveCommandByDevice/</link><description>### Retrieve Command by Device ###

Returns stored commands for all actors of a device

Path: cs-ws/resources/commands/device        Method: GET

Parameters

* apikey
* device_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
* sentOnly ...=True only commands are retrieved that are not sent up to now, otherwise all command are retrieved

Errors:

* 401 UNAUTHORIZED if key is invalid
* 404 NOT FOUND if the device is not found

Example

~~~~~~
GET http://localhost/cs-ws/resources/commands/device/?direction=asc&amp;sentOnly=True&amp;
to=3000-01-01%2001%3A00%3A00.000&amp;from=1970-01-01%2001%3A00%3A00.000&amp;
device_name=TempDev2&amp;apikey=1234 HTTP/1.1

&lt;devices&gt;
   &lt;command&gt;
      &lt;activation_time&gt;2012-08-31 22:56:54.036&lt;/activation_time&gt;
      &lt;actor&gt;Valve1&lt;/actor&gt;
      &lt;execution_time&gt;1970-01-01 00:00:00.000&lt;/execution_time&gt;
      &lt;id&gt;9&lt;/id&gt;
      &lt;model&gt;TemperatureDevice&lt;/model&gt;
      &lt;name&gt;TempDev2&lt;/name&gt;
      &lt;parameter&gt;
         &lt;name&gt;WaterValve&lt;/name&gt;
         &lt;value&gt;2&lt;/value&gt;
      &lt;/parameter&gt;
      &lt;status&gt;Sent&lt;/status&gt;
   &lt;/command&gt;
&lt;/devices&gt;
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 10:19:29 -0000</pubDate><guid>https://sourceforge.net136dc75987ebc8731e131db4228d22a8d1e7206c</guid></item></channel></rss>