<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to UpdateActorModel</title><link>https://sourceforge.net/p/m2mlabs/wiki/UpdateActorModel/</link><description>Recent changes to UpdateActorModel</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/UpdateActorModel/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 22 Sep 2012 20:38:45 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/UpdateActorModel/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage UpdateActorModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/UpdateActorModel/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -34,7 +34,7 @@
 Errors:
 
 * 401 UNAUTHORIZED if key is invalid or not admin key
-* 404 NOT FOUND if the sensor model  in the post data is not existing
+* 404 NOT FOUND if the actor model  in the post data is not existing
 
 Example
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 20:38:45 -0000</pubDate><guid>https://sourceforge.net479f1071032b8661ff66135ae67b5d2735c69080</guid></item><item><title>WikiPage UpdateActorModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/UpdateActorModel/</link><description>### Update Actor Model ###

changes the actor model in the domain of an owner identified by the apikey
the full actor model is replaced, not a delta to the existing one

Path: cs-ws/resources/admin/actormodel        Method: PUT
Alternative: cs-ws/resources/admin/actormodel/put        Method: POST

Parameters

* apikey

Data

~~~~~~
&lt;actormodel&gt;
   1..n attributes containing name and datatype of the attribute
   &lt;attribute&gt;
      &lt;name&gt;...&lt;/name&gt;
      &lt;type&gt;...&lt;/type&gt;  one of Number, Date, Boolean, Text, GpsData
   &lt;/attribute&gt;
   ...
   1..n configuration parameters containing a display name and an internal name
   values are assigned when an actor based on the actor model is created
   &lt;config&gt;
      &lt;displayname&gt;...&lt;/displayname&gt;
      &lt;name&gt;...&lt;/name&gt;
   &lt;/config&gt;
   ...
   &lt;name&gt;...&lt;/name&gt;
&lt;/actormodel&gt;
~~~~~~

Errors:

* 401 UNAUTHORIZED if key is invalid or not admin key
* 404 NOT FOUND if the sensor model  in the post data is not existing

Example

~~~~~~
PUT http://localhost/cs-ws/resources/admin/actormodel/?apikey=1234 HTTP/1.1
&lt;actormodel&gt;
   &lt;attribute&gt;
      &lt;name&gt;Position&lt;/name&gt;
      &lt;type&gt;Boolean&lt;/type&gt;
   &lt;/attribute&gt;
   &lt;config&gt;
      &lt;displayname&gt;Maximum&lt;/displayname&gt;
      &lt;name&gt;max&lt;/name&gt;
   &lt;/config&gt;
   &lt;name&gt;WaterValve&lt;/name&gt;
&lt;/actormodel&gt;

HTTP/1.1 200 OK
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 17:19:42 -0000</pubDate><guid>https://sourceforge.netef5c88d4eabbb6fbd8731699e43dee738379c84a</guid></item></channel></rss>