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

 changes the command in the domain of an owner identified by the apikey
 the full command is replaced, not a delta to the existing one
@@ -38,13 +38,14 @@
 Example

 ~~~~~~
-PUT http://localhost/cs-ws/resources/admin/command/?apikey=1234 HTTP/1.1
+PUT http://localhost/cs-ws/resources/admin/command?apikey=1234 HTTP/1.1
 &lt;command&gt;&lt;/command&gt;
    &amp;lt;name&amp;gt;TempDev2&amp;lt;/name&amp;gt;
    &amp;lt;actor&amp;gt;Valve1&amp;lt;/actor&amp;gt;
    &amp;lt;id&amp;gt;8&amp;lt;/id&amp;gt;
    &amp;lt;status&amp;gt;Ok&amp;lt;/status&amp;gt;
    &amp;lt;activation_time&amp;gt;2012-08-31 21:56:54.036&amp;lt;/activation_time&amp;gt;
+   &amp;lt;execution_time&amp;gt;2012-08-31 22:56:54.036&amp;lt;/execution_time&amp;gt;
    &amp;lt;parameter&amp;gt;
       &amp;lt;name&amp;gt;WaterValve&amp;lt;/name&amp;gt;
       &amp;lt;value&amp;gt;2.0&amp;lt;/value&amp;gt;
&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 22:09:15 -0000</pubDate><guid>https://sourceforge.netdabf8fe7b419a272057f1e23e6530cf9c0709c5e</guid></item><item><title>WikiPage UpdateCommand modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/UpdateCommand/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -13,44 +13,32 @@
 Data
 
 ~~~~~~
-&lt;device&gt;
-   &lt;name&gt;...&lt;/name&gt;
-   &lt;model&gt;..&lt;/model&gt;
-   &lt;config&gt;                optional device configuration parameters
-      &lt;name&gt;...&lt;/name&gt;
-      &lt;value&gt;...&lt;/value&gt;
-   &lt;/config&gt;
-   ...
-   &lt;sensor&gt;                optional if sensor configuration parameters are set
-      &lt;name&gt;...&lt;/name&gt;     
-      &lt;config&gt;             
-         &lt;name&gt;...&lt;/name&gt;
-         &lt;value&gt;...&lt;/value&gt;
-      &lt;/config&gt;
-      ...
-   &lt;/sensor&gt;
-   ...
-   &lt;actor&gt;                 optional if actor configuration parameters are set
-      &lt;name&gt;...&lt;/name&gt;     
-      &lt;config&gt;             
-         &lt;name&gt;...&lt;/name&gt;
-         &lt;value&gt;...&lt;/value&gt;
-      &lt;/config&gt;
-      ...
-   &lt;/actor&gt;
-   ...
-&lt;/device&gt;
+&lt;command&gt;
+   &lt;name&gt;...&lt;/name&gt;                        device name
+   &lt;actor&gt;...&lt;/actor&gt;                      actor name
+   &lt;id&gt;...&lt;/id&gt;                            unique number
+   &lt;status&gt;...&lt;/status&gt;                    New, Sent, Ok or Failed
+   &lt;activation_time&gt;...&lt;/activation_time&gt;  
+       time when command should be executed as yyyy-mm-dd hh:mm:ss.SSS
+       it is guaranteed that command is not sent before activation time
+   &lt;execution_time&gt;...&lt;/execution_time&gt;  
+       time when command was executed as yyyy-mm-dd hh:mm:ss.SSS
+   &lt;parameter&gt;                             parameters as defined in actor model
+       &lt;name&gt;...&lt;/name&gt;
+       &lt;value&gt;...&lt;/value&gt;
+   &lt;/parameter&gt;
+&lt;/command&gt;
 ~~~~~~
 
 Errors:
 
 * 401 UNAUTHORIZED if key is invalid or not admin key
-* 404 NOT FOUND if the device model  in the post data is not existing
+* 404 NOT FOUND if the command  in the post data is not existing
 
 Example
 
 ~~~~~~
-PUT http://localhost/cs-ws/resources/admin/device/?apikey=1234 HTTP/1.1
+PUT http://localhost/cs-ws/resources/admin/command/?apikey=1234 HTTP/1.1
 &lt;command&gt;
    &lt;name&gt;TempDev2&lt;/name&gt;
    &lt;actor&gt;Valve1&lt;/actor&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 09:56:17 -0000</pubDate><guid>https://sourceforge.netbff982fa146c2983deddae6934520df8f1188c81</guid></item><item><title>WikiPage UpdateCommand modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/UpdateCommand/</link><description>### Update Command ###

changes the command in the domain of an owner identified by the apikey
the full command is replaced, not a delta to the existing one

Path: cs-ws/resources/admin/command        Method: PUT
Alternative: cs-ws/resources/admin/command/put        Method: POST

Parameters

* apikey

Data

~~~~~~
&lt;device&gt;
   &lt;name&gt;...&lt;/name&gt;
   &lt;model&gt;..&lt;/model&gt;
   &lt;config&gt;                optional device configuration parameters
      &lt;name&gt;...&lt;/name&gt;
      &lt;value&gt;...&lt;/value&gt;
   &lt;/config&gt;
   ...
   &lt;sensor&gt;                optional if sensor configuration parameters are set
      &lt;name&gt;...&lt;/name&gt;     
      &lt;config&gt;             
         &lt;name&gt;...&lt;/name&gt;
         &lt;value&gt;...&lt;/value&gt;
      &lt;/config&gt;
      ...
   &lt;/sensor&gt;
   ...
   &lt;actor&gt;                 optional if actor configuration parameters are set
      &lt;name&gt;...&lt;/name&gt;     
      &lt;config&gt;             
         &lt;name&gt;...&lt;/name&gt;
         &lt;value&gt;...&lt;/value&gt;
      &lt;/config&gt;
      ...
   &lt;/actor&gt;
   ...
&lt;/device&gt;
~~~~~~

Errors:

* 401 UNAUTHORIZED if key is invalid or not admin key
* 404 NOT FOUND if the device model  in the post data is not existing

Example

~~~~~~
PUT http://localhost/cs-ws/resources/admin/device/?apikey=1234 HTTP/1.1
&lt;command&gt;
   &lt;name&gt;TempDev2&lt;/name&gt;
   &lt;actor&gt;Valve1&lt;/actor&gt;
   &lt;id&gt;8&lt;/id&gt;
   &lt;status&gt;Ok&lt;/status&gt;
   &lt;activation_time&gt;2012-08-31 21:56:54.036&lt;/activation_time&gt;
   &lt;parameter&gt;
      &lt;name&gt;WaterValve&lt;/name&gt;
      &lt;value&gt;2.0&lt;/value&gt;
   &lt;/parameter&gt;
&lt;/command&gt;

HTTP/1.1 200 OK
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sun, 23 Sep 2012 09:51:20 -0000</pubDate><guid>https://sourceforge.netceaa14cd1d714c36642eaa11a361f96e8ec9c3cd</guid></item></channel></rss>