Menu

UpdateMultipleCommands

Jim

Update Multiple Commands

changes multiple commands 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/list Method: PUT

Parameters

  • apikey

Data

<devices>
<command>
   <name>...</name>                        device name
   <actor>...</actor>                      actor name
   <id>...</id>                            unique number
   <status>...</status>                    New, Sent, Ok or Failed
   <activation_time>...</activation_time>  
       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
   <execution_time>...</execution_time>  
       time when command was executed as yyyy-mm-dd hh:mm:ss.SSS
   <parameter>                             parameters as defined in actor model
       <name>...</name>
       <value>...</value>
   </parameter>
</command>
<command>
   ...
</command>
</devices>

Errors:

  • 401 UNAUTHORIZED if key is invalid or not admin key
  • 404 NOT FOUND if the command in the post data is not existing

Example

PUT http://localhost/cs-ws/resources/admin/command/list?apikey=1234 HTTP/1.1
<devices>
<command>
   <name>TempDev2</name>
   <actor>Valve1</actor>
   <id>8</id>
   <status>Ok</status>
   <activation_time>2012-08-31 21:56:54.036</activation_time>
   <execution_time>2012-08-31 22:56:54.036</execution_time>
   <parameter>
      <name>WaterValve</name>
      <value>2.0</value>
   </parameter>
</command>
<command>
   ...
</command>
</devices>

HTTP/1.1 200 OK

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.