<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to CreateEventModel</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateEventModel/</link><description>Recent changes to CreateEventModel</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateEventModel/feed" rel="self"/><language>en</language><lastBuildDate>Thu, 04 Jan 2018 10:09:57 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateEventModel/feed" rel="self" type="application/rss+xml"/><item><title>CreateEventModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateEventModel/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,6 +1,6 @@
 ### Create new Event Model ###

-Creates a new event model in the domain of the owner identified by the apikey
+Creates a new event model in the domain of the owner identified by the apikey. An event model implicitly always contains the rawdata attribute of type String.

 Path: cs-ws/resources/admin/eventmodel        Method: POST

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Thu, 04 Jan 2018 10:09:57 -0000</pubDate><guid>https://sourceforge.net53ae4720380b2c0a3fa2603bba7c470c6aab5a54</guid></item><item><title>CreateEventModel modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateEventModel/</link><description>&lt;div class="markdown_content"&gt;&lt;h3 id="create-new-event-model"&gt;Create new Event Model&lt;/h3&gt;
&lt;p&gt;Creates a new event model in the domain of the owner identified by the apikey&lt;/p&gt;
&lt;p&gt;Path: cs-ws/resources/admin/eventmodel        Method: POST&lt;/p&gt;
&lt;p&gt;Parameters&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;apikey&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Data&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="nt"&gt;&amp;lt;eventmodel&amp;gt;&lt;/span&gt;
   1..n attributes containing name and datatype of the attribute
   &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;...&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;type&amp;gt;&lt;/span&gt;...&lt;span class="nt"&gt;&amp;lt;/type&amp;gt;&lt;/span&gt;  one of Number, Date, Boolean, Text, GpsData
   &lt;span class="nt"&gt;&amp;lt;/attribute&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/eventmodel&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Errors:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;401 UNAUTHORIZED if key is invalid or not admin key&lt;/li&gt;
&lt;li&gt;409 CONFLICT if sensor model already exists&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Example&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;POST http://localhost/cs-ws/resources/admin/eventmodel?apikey=1234 HTTP/1.1
&lt;span class="nt"&gt;&amp;lt;eventmodel&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;type&amp;gt;&lt;/span&gt;Number&lt;span class="nt"&gt;&amp;lt;/type&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;type&amp;gt;&lt;/span&gt;Number&lt;span class="nt"&gt;&amp;lt;/type&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;EvModel1&lt;span class="nt"&gt;&amp;lt;/name&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/eventmodel&amp;gt;&lt;/span&gt;

HTTP/1.1 200 OK
&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 10:09:08 -0000</pubDate><guid>https://sourceforge.net2ca6d6fe901558886d69f08b7d91696d80094bc1</guid></item></channel></rss>