<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to CreateOwner</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/</link><description>Recent changes to CreateOwner</description><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 22 Sep 2012 09:50:21 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage CreateOwner modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/</link><description>&lt;pre&gt;--- v2
+++ v3
@@ -20,8 +20,8 @@
 
 Errors:
 
+* 401 UNAUTHORIZED if key is invalid or not admin key
 * 409 CONFLICT if owner already exists
-* 401 UNAUTHORIZED if key is invalid or not admin key
 
 Example
 
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 09:50:21 -0000</pubDate><guid>https://sourceforge.netf24c93e2bd2835e49d48885edd01402fca855c88</guid></item><item><title>WikiPage CreateOwner modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/</link><description>&lt;pre&gt;--- v1
+++ v2
@@ -8,7 +8,7 @@
 
 * apikey
 
-POST Data
+Data
 
 ~~~~~~
 &lt;owner&gt;
@@ -27,21 +27,12 @@
 
 ~~~~~~
 POST http://localhost/cs-ws/resources/admin/owners?apikey=1234 HTTP/1.1
-Accept-Encoding: gzip,deflate
-Content-Type: application/xml
-User-Agent: Jakarta Commons-HttpClient/3.1
-Host: localhost
-Content-Length: 82
 &lt;owner&gt;
    &lt;apikey&gt;9999&lt;/apikey&gt;
    &lt;name&gt;test5&lt;/name&gt;
 &lt;/owner&gt;
 
 HTTP/1.1 201 Created
-Server: GlassFish Server Open Source Edition 3.1.2
-Content-Type: application/xml
-Content-Length: 171
-Date: Thu, 20 Sep 2012 19:54:32 GMT
 &lt;ownerEntity&gt;
    &lt;data&gt;
       &lt;apikey&gt;9999&lt;/apikey&gt;
&lt;/pre&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 08:42:29 -0000</pubDate><guid>https://sourceforge.netcf2c165bb2472dc4357a05a5768ed15247d214d5</guid></item><item><title>WikiPage CreateOwner modified by Jim</title><link>https://sourceforge.net/p/m2mlabs/wiki/CreateOwner/</link><description>### Create new Owner ###

Creates a new owner and returns the newly created owner, can only be executed with the admin apikey

Path: cs-ws/resources/admin/owners        Method: POST

Parameters

* apikey

POST Data

~~~~~~
&lt;owner&gt;
   &lt;apikey&gt;...&lt;/apikey&gt;        apikey for the created owner 
   &lt;id&gt;...&lt;/id&gt;                optional id, if empty name is taken as id
   &lt;name&gt;...&lt;/name&gt;            name of the owner
&lt;/owner&gt;
~~~~~~

Errors:

* 409 CONFLICT if owner already exists
* 401 UNAUTHORIZED if key is invalid or not admin key

Example

~~~~~~
POST http://localhost/cs-ws/resources/admin/owners?apikey=1234 HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/xml
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost
Content-Length: 82
&lt;owner&gt;
   &lt;apikey&gt;9999&lt;/apikey&gt;
   &lt;name&gt;test5&lt;/name&gt;
&lt;/owner&gt;

HTTP/1.1 201 Created
Server: GlassFish Server Open Source Edition 3.1.2
Content-Type: application/xml
Content-Length: 171
Date: Thu, 20 Sep 2012 19:54:32 GMT
&lt;ownerEntity&gt;
   &lt;data&gt;
      &lt;apikey&gt;9999&lt;/apikey&gt;
      &lt;id&gt;test5&lt;/id&gt;
      &lt;name&gt;test5&lt;/name&gt;
   &lt;/data&gt;
   &lt;success&gt;true&lt;/success&gt;
&lt;/ownerEntity&gt;
~~~~~~
</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Jim</dc:creator><pubDate>Sat, 22 Sep 2012 07:55:55 -0000</pubDate><guid>https://sourceforge.net6555dd21409a5478bf489281f229a9426d0d82f9</guid></item></channel></rss>