Commit f1cba6ed authored by Roman S's avatar Roman S Committed by daryl herzmann

REST API plugin update to 1.2.3 (#584)

* Added: Add a group with role to a chat room
* Added: Occupants endpoint for chat room
* Fixed: Admin and Member list to group endpoint
parent 7c3ef25c
......@@ -44,7 +44,14 @@
REST API Plugin Changelog
</h1>
<p><b>1.2.2</b> -- January 20th, 2015</p>
<p><b>1.2.3</b> -- May 3rd, 2016</p>
<ul>
<li>Added: Add a group with role to a chat room</li>
<li>Added: Occupants endpoint for chat room</li>
<li>Fixed: Admin and Member list to group endpoint</li>
</ul>
<p><b>1.2.2</b> -- January 20th, 2016</p>
<ul>
<li>Added: Presence status to the Session Enitity. E.g. Online, Away etc.</li>
<li>Fixed: Node parameter in the Session Enitity. E.g. Local or Remote</li>
......
......@@ -5,8 +5,8 @@
<name>REST API</name>
<description>Allows administration over a RESTful API.</description>
<author>Roman Soldatow</author>
<version>1.2.2</version>
<date>01/20/2016</date>
<version>1.2.3</version>
<date>05/03/2016</date>
<minServerVersion>4.0.0</minServerVersion>
<adminconsole>
<tab id="tab-server">
......
......@@ -1313,162 +1313,167 @@ body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaV
</ul>
</li>
<li><a href="#lockout-a-user">Lockout a user</a><ul>
<li><a href="#possible-parameters-8-1">Possible parameters</a></li>
<li><a href="#examples-9-1">Examples</a></li>
</ul>
</li>
<li><a href="#unlock-a-user">Unlock a user</a><ul>
<li><a href="#possible-parameters-9">Possible parameters</a></li>
<li><a href="#examples-10">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-user-roster">Retrieve user roster</a><ul>
<li><a href="#unlock-a-user">Unlock a user</a><ul>
<li><a href="#possible-parameters-10">Possible parameters</a></li>
<li><a href="#examples-11">Examples</a></li>
</ul>
</li>
<li><a href="#create-a-user-roster-entry">Create a user roster entry</a><ul>
<li><a href="#retrieve-user-roster">Retrieve user roster</a><ul>
<li><a href="#possible-parameters-11">Possible parameters</a></li>
<li><a href="#examples-12">Examples</a></li>
</ul>
</li>
<li><a href="#delete-a-user-roster-entry">Delete a user roster entry</a><ul>
<li><a href="#create-a-user-roster-entry">Create a user roster entry</a><ul>
<li><a href="#possible-parameters-12">Possible parameters</a></li>
<li><a href="#examples-13">Examples</a></li>
</ul>
</li>
<li><a href="#update-a-user-roster-entry">Update a user roster entry</a><ul>
<li><a href="#delete-a-user-roster-entry">Delete a user roster entry</a><ul>
<li><a href="#possible-parameters-13">Possible parameters</a></li>
<li><a href="#examples-14">Examples</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#chat-room-related-rest-endpoints">Chat room related REST Endpoints</a><ul>
<li><a href="#retrieve-all-chat-rooms">Retrieve all chat rooms</a><ul>
<li><a href="#update-a-user-roster-entry">Update a user roster entry</a><ul>
<li><a href="#possible-parameters-14">Possible parameters</a></li>
<li><a href="#examples-15">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-a-chat-room">Retrieve a chat room</a><ul>
</ul>
</li>
<li><a href="#chat-room-related-rest-endpoints">Chat room related REST Endpoints</a><ul>
<li><a href="#retrieve-all-chat-rooms">Retrieve all chat rooms</a><ul>
<li><a href="#possible-parameters-15">Possible parameters</a></li>
<li><a href="#examples-16">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-chat-room-participants">Retrieve chat room participants</a><ul>
<li><a href="#retrieve-a-chat-room">Retrieve a chat room</a><ul>
<li><a href="#possible-parameters-16">Possible parameters</a></li>
<li><a href="#examples-17">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-chat-room-participants">Retrieve chat room participants</a><ul>
<li><a href="#possible-parameters-17">Possible parameters</a></li>
<li><a href="#examples-18">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-chat-room-occupants">Retrieve chat room occupants</a><ul>
<li><a href="#possible-parameters-get-occupants">Possible parameters</a></li>
<li><a href="#examples-get-occupants">Examples</a></li>
<li><a href="#possible-parameters-18">Possible parameters</a></li>
<li><a href="#examples-19">Examples</a></li>
</ul>
</li>
<li><a href="#create-a-chat-room">Create a chat room</a><ul>
<li><a href="#possible-parameters-17">Possible parameters</a></li>
<li><a href="#possible-parameters-19">Possible parameters</a></li>
<li><a href="#xml-examples-1">XML Examples</a></li>
<li><a href="#json-examples-1">JSON Examples</a></li>
</ul>
</li>
<li><a href="#delete-a-chat-room">Delete a chat room</a><ul>
<li><a href="#possible-parameters-17-1">Possible parameters</a></li>
<li><a href="#examples-17-1">Examples</a></li>
<li><a href="#possible-parameters-20">Possible parameters</a></li>
<li><a href="#examples-20">Examples</a></li>
</ul>
</li>
<li><a href="#update-a-chat-room">Update a chat room</a><ul>
<li><a href="#possible-parameters-18">Possible parameters</a></li>
<li><a href="#examples-18">Examples</a></li>
<li><a href="#possible-parameters-21">Possible parameters</a></li>
<li><a href="#examples-21">Examples</a></li>
</ul>
</li>
<li><a href="#add-user-with-role-to-chat-room">Add user with role to chat room</a><ul>
<li><a href="#possible-parameters-19">Possible parameters</a></li>
<li><a href="#examples-19">Examples</a></li>
<li><a href="#possible-parameters-22">Possible parameters</a></li>
<li><a href="#examples-22">Examples</a></li>
</ul>
</li>
<li><a href="#add-group-with-role-to-chat-room">Add group with role to chat room</a><ul>
<li><a href="#possible-parameters-23">Possible parameters</a></li>
<li><a href="#examples-23">Examples</a></li>
</ul>
</li>
<li><a href="#delete-a-user-from-a-chat-room">Delete a user from a chat room</a><ul>
<li><a href="#possible-parameters-20">Possible parameters</a></li>
<li><a href="#examples-20">Examples</a></li>
<li><a href="#possible-parameters-24">Possible parameters</a></li>
<li><a href="#examples-24">Examples</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#system-related-rest-endpoints">System related REST Endpoints</a><ul>
<li><a href="#retrieve-all-system-properties">Retrieve all system properties</a><ul>
<li><a href="#examples-21">Examples</a></li>
<li><a href="#examples-25">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-system-property">Retrieve system property</a><ul>
<li><a href="#possible-parameters-21">Possible parameters</a></li>
<li><a href="#examples-22">Examples</a></li>
<li><a href="#possible-parameters-25">Possible parameters</a></li>
<li><a href="#examples-26">Examples</a></li>
</ul>
</li>
<li><a href="#create-a-system-property">Create a system property</a><ul>
<li><a href="#examples-23">Examples</a></li>
<li><a href="#examples-27">Examples</a></li>
</ul>
</li>
<li><a href="#delete-a-system-property">Delete a system property</a><ul>
<li><a href="#possible-parameters-22">Possible parameters</a></li>
<li><a href="#examples-24">Examples</a></li>
<li><a href="#possible-parameters-26">Possible parameters</a></li>
<li><a href="#examples-28">Examples</a></li>
</ul>
</li>
<li><a href="#update-a-system-property">Update a system property</a><ul>
<li><a href="#possible-parameters-23">Possible parameters</a></li>
<li><a href="#examples-25">Examples</a></li>
<li><a href="#possible-parameters-27">Possible parameters</a></li>
<li><a href="#examples-29">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-concurrent-sessions">Retrieve concurrent sessions</a><ul>
<li><a href="#examples-26">Examples</a></li>
<li><a href="#examples-30">Examples</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#group-related-rest-endpoints">Group related REST Endpoints</a><ul>
<li><a href="#retrieve-all-groups">Retrieve all groups</a><ul>
<li><a href="#examples-27">Examples</a></li>
<li><a href="#examples-31">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-a-group">Retrieve a group</a><ul>
<li><a href="#possible-parameters-24">Possible parameters</a></li>
<li><a href="#examples-28">Examples</a></li>
<li><a href="#possible-parameters-28">Possible parameters</a></li>
<li><a href="#examples-32">Examples</a></li>
</ul>
</li>
<li><a href="#create-a-group">Create a group</a><ul>
<li><a href="#examples-29">Examples</a></li>
<li><a href="#examples-33">Examples</a></li>
</ul>
</li>
<li><a href="#delete-a-group">Delete a group</a><ul>
<li><a href="#possible-parameters-25">Possible parameters</a></li>
<li><a href="#examples-30">Examples</a></li>
<li><a href="#possible-parameters-29">Possible parameters</a></li>
<li><a href="#examples-34">Examples</a></li>
</ul>
</li>
<li><a href="#update-a-group">Update a group</a><ul>
<li><a href="#possible-parameters-26">Possible parameters</a></li>
<li><a href="#examples-31">Examples</a></li>
<li><a href="#possible-parameters-30">Possible parameters</a></li>
<li><a href="#examples-35">Examples</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#session-related-rest-endpoints">Session related REST Endpoints</a><ul>
<li><a href="#retrieve-all-user-session">Retrieve all user session</a><ul>
<li><a href="#examples-32">Examples</a></li>
<li><a href="#examples-36">Examples</a></li>
</ul>
</li>
<li><a href="#retrieve-the-user-sessions">Retrieve the user sessions</a><ul>
<li><a href="#possible-parameters-27">Possible parameters</a></li>
<li><a href="#examples-33">Examples</a></li>
<li><a href="#possible-parameters-31">Possible parameters</a></li>
<li><a href="#examples-37">Examples</a></li>
</ul>
</li>
<li><a href="#close-all-user-sessions">Close all user sessions</a><ul>
<li><a href="#possible-parameters-28">Possible parameters</a></li>
<li><a href="#examples-34">Examples</a></li>
<li><a href="#possible-parameters-32">Possible parameters</a></li>
<li><a href="#examples-38">Examples</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#message-related-rest-endpoints">Message related REST Endpoints</a><ul>
<li><a href="#send-a-broadcast-message">Send a broadcast message</a><ul>
<li><a href="#examples-35">Examples</a></li>
<li><a href="#examples-39">Examples</a></li>
</ul>
</li>
</ul>
......@@ -1486,6 +1491,8 @@ body.pdf{font-family:"DejaVu Sans"}body.pdf code,body.pdf pre{font-family:"DejaV
</div>
</p>
<h2 id="feature-list">Feature list</h2>
<ul>
......@@ -1798,11 +1805,64 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<td>Yes</td>
<td>A collection with the current list of outcast users. An outcast user is not allowed to join the room again. The collection contains the bareJID of the users with outcast affiliation.</td>
</tr>
<tr>
<td>ownerGroups</td>
<td>Yes</td>
<td>A collection with the current list of groups with owner affiliation. The collection contains the name only.</td>
</tr>
<tr>
<td>adminGroups</td>
<td>Yes</td>
<td>A collection with the current list of groups with admin affiliation. The collection contains the name only.</td>
</tr>
<tr>
<td>memberGroups</td>
<td>Yes</td>
<td>A collection with the current list of groups with member affiliation. The collection contains the name only.</td>
</tr>
<tr>
<td>outcastGroups</td>
<td>Yes</td>
<td>A collection with the current list of groups with outcast affiliation. The collection contains the name only.</td>
</tr>
</tbody></table>
<h3 id="group">Group</h3>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Optional</th>
<th>Description</th>
</tr>
</thead>
<tbody><tr>
<td>name</td>
<td>No</td>
<td>The name of the group</td>
</tr>
<tr>
<td>description</td>
<td>No</td>
<td>The description of the group</td>
</tr>
<tr>
<td>admins</td>
<td>Yes</td>
<td>A collection with current admins of the group</td>
</tr>
<tr>
<td>members</td>
<td>Yes</td>
<td>A collection with current members of the group</td>
</tr>
</tbody></table>
<h3 id="system-property">System Property</h3>
<table>
......@@ -2067,27 +2127,27 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">user</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>test3<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">password</span>&gt;</span>p4ssword<span class="hljs-tag">&lt;/<span class="hljs-title">password</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">user</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;user&gt;</span><span class="pln">
</span><span class="tag">&lt;username&gt;</span><span class="pln">test3</span><span class="tag">&lt;/username&gt;</span><span class="pln">
</span><span class="tag">&lt;password&gt;</span><span class="pln">p4ssword</span><span class="tag">&lt;/password&gt;</span><span class="pln">
</span><span class="tag">&lt;/user&gt;</span></code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">user</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>testuser<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">password</span>&gt;</span>p4ssword<span class="hljs-tag">&lt;/<span class="hljs-title">password</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">name</span>&gt;</span>Test User<span class="hljs-tag">&lt;/<span class="hljs-title">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">email</span>&gt;</span>test@localhost.de<span class="hljs-tag">&lt;/<span class="hljs-title">email</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"keyname"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"value"</span>/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"anotherkey"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"value"</span>/&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">user</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;user&gt;</span><span class="pln">
</span><span class="tag">&lt;username&gt;</span><span class="pln">testuser</span><span class="tag">&lt;/username&gt;</span><span class="pln">
</span><span class="tag">&lt;password&gt;</span><span class="pln">p4ssword</span><span class="tag">&lt;/password&gt;</span><span class="pln">
</span><span class="tag">&lt;name&gt;</span><span class="pln">Test User</span><span class="tag">&lt;/name&gt;</span><span class="pln">
</span><span class="tag">&lt;email&gt;</span><span class="pln">test@localhost.de</span><span class="tag">&lt;/email&gt;</span><span class="pln">
</span><span class="tag">&lt;properties&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"keyname"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"value"</span><span class="tag">/&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"anotherkey"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"value"</span><span class="tag">/&gt;</span><span class="pln">
</span><span class="tag">&lt;/properties&gt;</span><span class="pln">
</span><span class="tag">&lt;/user&gt;</span></code></pre>
......@@ -2104,33 +2164,33 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs json">{
"<span class="hljs-attribute">username</span>": <span class="hljs-value"><span class="hljs-string">"admin"</span></span>,
"<span class="hljs-attribute">password</span>": <span class="hljs-value"><span class="hljs-string">"p4ssword"</span>
</span>}</code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">{</span><span class="pln">
</span><span class="str">"username"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"admin"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"password"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"p4ssword"</span><span class="pln">
</span><span class="pun">}</span></code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class="prettyprint"><code class=" hljs json">{
"<span class="hljs-attribute">username</span>": <span class="hljs-value"><span class="hljs-string">"admin"</span></span>,
"<span class="hljs-attribute">password</span>": <span class="hljs-value"><span class="hljs-string">"p4ssword"</span></span>,
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Administrator"</span></span>,
"<span class="hljs-attribute">email</span>": <span class="hljs-value"><span class="hljs-string">"admin@example.com"</span></span>,
"<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">property</span>": <span class="hljs-value">[
{
"<span class="hljs-attribute">@key</span>": <span class="hljs-value"><span class="hljs-string">"console.rows_per_page"</span></span>,
"<span class="hljs-attribute">@value</span>": <span class="hljs-value"><span class="hljs-string">"user-summary=8"</span>
</span>},
{
"<span class="hljs-attribute">@key</span>": <span class="hljs-value"><span class="hljs-string">"console.order"</span></span>,
"<span class="hljs-attribute">@value</span>": <span class="hljs-value"><span class="hljs-string">"session-summary=1"</span>
</span>}
]
</span>}
</span>}</code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">{</span><span class="pln">
</span><span class="str">"username"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"admin"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"password"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"p4ssword"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"name"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"Administrator"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"email"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"admin@example.com"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"properties"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="str">"property"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">[</span><span class="pln">
</span><span class="pun">{</span><span class="pln">
</span><span class="str">"@key"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"console.rows_per_page"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"@value"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"user-summary=8"</span><span class="pln">
</span><span class="pun">},</span><span class="pln">
</span><span class="pun">{</span><span class="pln">
</span><span class="str">"@key"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"console.order"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"@value"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"session-summary=1"</span><span class="pln">
</span><span class="pun">}</span><span class="pln">
</span><span class="pun">]</span><span class="pln">
</span><span class="pun">}</span><span class="pln">
</span><span class="pun">}</span></code></pre>
......@@ -2230,15 +2290,15 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">user</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>testuser<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">name</span>&gt;</span>Test User edit<span class="hljs-tag">&lt;/<span class="hljs-title">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">email</span>&gt;</span>test@edit.de<span class="hljs-tag">&lt;/<span class="hljs-title">email</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"keyname"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"value"</span>/&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">user</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;user&gt;</span><span class="pln">
</span><span class="tag">&lt;username&gt;</span><span class="pln">testuser</span><span class="tag">&lt;/username&gt;</span><span class="pln">
</span><span class="tag">&lt;name&gt;</span><span class="pln">Test User edit</span><span class="tag">&lt;/name&gt;</span><span class="pln">
</span><span class="tag">&lt;email&gt;</span><span class="pln">test@edit.de</span><span class="tag">&lt;/email&gt;</span><span class="pln">
</span><span class="tag">&lt;properties&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"keyname"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"value"</span><span class="tag">/&gt;</span><span class="pln">
</span><span class="tag">&lt;/properties&gt;</span><span class="pln">
</span><span class="tag">&lt;/user&gt;</span></code></pre>
......@@ -2255,15 +2315,15 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">user</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">username</span>&gt;</span>newUsername<span class="hljs-tag">&lt;/<span class="hljs-title">username</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">name</span>&gt;</span>Test User edit<span class="hljs-tag">&lt;/<span class="hljs-title">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">email</span>&gt;</span>test@edit.de<span class="hljs-tag">&lt;/<span class="hljs-title">email</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"keyname"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"value"</span>/&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">properties</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">user</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;user&gt;</span><span class="pln">
</span><span class="tag">&lt;username&gt;</span><span class="pln">newUsername</span><span class="tag">&lt;/username&gt;</span><span class="pln">
</span><span class="tag">&lt;name&gt;</span><span class="pln">Test User edit</span><span class="tag">&lt;/name&gt;</span><span class="pln">
</span><span class="tag">&lt;email&gt;</span><span class="pln">test@edit.de</span><span class="tag">&lt;/email&gt;</span><span class="pln">
</span><span class="tag">&lt;properties&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"keyname"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"value"</span><span class="tag">/&gt;</span><span class="pln">
</span><span class="tag">&lt;/properties&gt;</span><span class="pln">
</span><span class="tag">&lt;/user&gt;</span></code></pre>
......@@ -2280,17 +2340,17 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs json">{
"<span class="hljs-attribute">username</span>": <span class="hljs-value"><span class="hljs-string">"testuser"</span></span>,
"<span class="hljs-attribute">name</span>": <span class="hljs-value"><span class="hljs-string">"Test User edit"</span></span>,
"<span class="hljs-attribute">email</span>": <span class="hljs-value"><span class="hljs-string">"test@edit.de"</span></span>,
"<span class="hljs-attribute">properties</span>": <span class="hljs-value">{
"<span class="hljs-attribute">property</span>": <span class="hljs-value">{
"<span class="hljs-attribute">@key</span>": <span class="hljs-value"><span class="hljs-string">"keyname"</span></span>,
"<span class="hljs-attribute">@value</span>": <span class="hljs-value"><span class="hljs-string">"value"</span>
</span>}
</span>}
</span>}</code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">{</span><span class="pln">
</span><span class="str">"username"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"testuser"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"name"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"Test User edit"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"email"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"test@edit.de"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"properties"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="str">"property"</span><span class="pun">:</span><span class="pln"> </span><span class="pun">{</span><span class="pln">
</span><span class="str">"@key"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"keyname"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"@value"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"value"</span><span class="pln">
</span><span class="pun">}</span><span class="pln">
</span><span class="pun">}</span><span class="pln">
</span><span class="pun">}</span></code></pre>
......@@ -2350,6 +2410,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>Payload:</strong> Groups <br>
<strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-5">Possible parameters</h3>
<table>
......@@ -2385,11 +2447,11 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>Admins<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>Support<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">groups</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;groups&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">Admins</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">Support</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;/groups&gt;</span></code></pre>
......@@ -2404,6 +2466,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>Payload:</strong> none <br>
<strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-6">Possible parameters</h3>
<table>
......@@ -2430,6 +2494,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
</tbody></table>
<h3 id="examples-7">Examples</h3>
<blockquote>
......@@ -2439,6 +2505,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/groups/testGroup">http://example.org:9090/plugins/restapi/v1/users/testuser/groups/testGroup</a></p>
</blockquote>
<h2 id="delete-a-user-from-a-groups">Delete a user from a groups</h2>
<p>Endpoint to remove a user from a groups</p>
......@@ -2450,6 +2518,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>Payload:</strong> Groups <br>
<strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-7">Possible parameters</h3>
<table>
......@@ -2485,11 +2555,11 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>Admins<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>Support<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">groups</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;groups&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">Admins</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">Support</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;/groups&gt;</span></code></pre>
......@@ -2504,6 +2574,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>Payload:</strong> none <br>
<strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-8">Possible parameters</h3>
<table>
......@@ -2530,6 +2602,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
</tbody></table>
<h3 id="examples-9">Examples</h3>
<blockquote>
......@@ -2539,6 +2613,8 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<p><strong>DELETE</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/groups/testGroup">http://example.org:9090/plugins/restapi/v1/users/testuser/groups/testGroup</a></p>
</blockquote>
<h2 id="lockout-a-user">Lockout a user</h2>
<p>Endpoint to lockout / ban the user from the chat server. The user will be kicked if the user is online.</p>
......@@ -2552,7 +2628,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="possible-parameters-8">Possible parameters</h3>
<h3 id="possible-parameters-9">Possible parameters</h3>
<table>
<thead>
......@@ -2574,7 +2650,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="examples-9">Examples</h3>
<h3 id="examples-10">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2597,7 +2673,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="possible-parameters-9">Possible parameters</h3>
<h3 id="possible-parameters-10">Possible parameters</h3>
<table>
<thead>
......@@ -2619,7 +2695,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="examples-10">Examples</h3>
<h3 id="examples-11">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2642,7 +2718,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="possible-parameters-10">Possible parameters</h3>
<h3 id="possible-parameters-11">Possible parameters</h3>
<table>
<thead>
......@@ -2664,7 +2740,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="examples-11">Examples</h3>
<h3 id="examples-12">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2687,7 +2763,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="possible-parameters-11">Possible parameters</h3>
<h3 id="possible-parameters-12">Possible parameters</h3>
<table>
<thead>
......@@ -2709,7 +2785,7 @@ If you want to create a resource with JSON data format, please add “<strong>Co
<h3 id="examples-12">Examples</h3>
<h3 id="examples-13">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -2723,24 +2799,24 @@ Payload Example 1 (required parameters):</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">rosterItem</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">jid</span>&gt;</span>peter@pan.de<span class="hljs-tag">&lt;/<span class="hljs-title">jid</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">rosterItem</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;rosterItem&gt;</span><span class="pln">
</span><span class="tag">&lt;jid&gt;</span><span class="pln">peter@pan.de</span><span class="tag">&lt;/jid&gt;</span><span class="pln">
</span><span class="tag">&lt;/rosterItem&gt;</span></code></pre>
<p>Payload Example 2 (available parameters):</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">rosterItem</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">jid</span>&gt;</span>peter@pan1.de<span class="hljs-tag">&lt;/<span class="hljs-title">jid</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">nickname</span>&gt;</span>Peter1<span class="hljs-tag">&lt;/<span class="hljs-title">nickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">subscriptionType</span>&gt;</span>3<span class="hljs-tag">&lt;/<span class="hljs-title">subscriptionType</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">group</span>&gt;</span>Friends<span class="hljs-tag">&lt;/<span class="hljs-title">group</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">rosterItem</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;rosterItem&gt;</span><span class="pln">
</span><span class="tag">&lt;jid&gt;</span><span class="pln">peter@pan1.de</span><span class="tag">&lt;/jid&gt;</span><span class="pln">
</span><span class="tag">&lt;nickname&gt;</span><span class="pln">Peter1</span><span class="tag">&lt;/nickname&gt;</span><span class="pln">
</span><span class="tag">&lt;subscriptionType&gt;</span><span class="pln">3</span><span class="tag">&lt;/subscriptionType&gt;</span><span class="pln">
</span><span class="tag">&lt;groups&gt;</span><span class="pln">
</span><span class="tag">&lt;group&gt;</span><span class="pln">Friends</span><span class="tag">&lt;/group&gt;</span><span class="pln">
</span><span class="tag">&lt;/groups&gt;</span><span class="pln">
</span><span class="tag">&lt;/rosterItem&gt;</span></code></pre>
......@@ -2757,7 +2833,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-12">Possible parameters</h3>
<h3 id="possible-parameters-13">Possible parameters</h3>
<table>
<thead>
......@@ -2785,7 +2861,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-13">Examples</h3>
<h3 id="examples-14">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2808,7 +2884,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-13">Possible parameters</h3>
<h3 id="possible-parameters-14">Possible parameters</h3>
<table>
<thead>
......@@ -2836,7 +2912,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-14">Examples</h3>
<h3 id="examples-15">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -2849,15 +2925,15 @@ Payload Example 1 (required parameters):</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">rosterItem</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">jid</span>&gt;</span>peter@pan.de<span class="hljs-tag">&lt;/<span class="hljs-title">jid</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">nickname</span>&gt;</span>Peter Pan<span class="hljs-tag">&lt;/<span class="hljs-title">nickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">subscriptionType</span>&gt;</span>0<span class="hljs-tag">&lt;/<span class="hljs-title">subscriptionType</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">group</span>&gt;</span>Support<span class="hljs-tag">&lt;/<span class="hljs-title">group</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">groups</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">rosterItem</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;rosterItem&gt;</span><span class="pln">
</span><span class="tag">&lt;jid&gt;</span><span class="pln">peter@pan.de</span><span class="tag">&lt;/jid&gt;</span><span class="pln">
</span><span class="tag">&lt;nickname&gt;</span><span class="pln">Peter Pan</span><span class="tag">&lt;/nickname&gt;</span><span class="pln">
</span><span class="tag">&lt;subscriptionType&gt;</span><span class="pln">0</span><span class="tag">&lt;/subscriptionType&gt;</span><span class="pln">
</span><span class="tag">&lt;groups&gt;</span><span class="pln">
</span><span class="tag">&lt;group&gt;</span><span class="pln">Support</span><span class="tag">&lt;/group&gt;</span><span class="pln">
</span><span class="tag">&lt;/groups&gt;</span><span class="pln">
</span><span class="tag">&lt;/rosterItem&gt;</span></code></pre>
......@@ -2878,7 +2954,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-14">Possible parameters</h3>
<h3 id="possible-parameters-15">Possible parameters</h3>
<table>
<thead>
......@@ -2912,7 +2988,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-15">Examples</h3>
<h3 id="examples-16">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2938,7 +3014,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-15">Possible parameters</h3>
<h3 id="possible-parameters-16">Possible parameters</h3>
<table>
<thead>
......@@ -2966,7 +3042,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-16">Examples</h3>
<h3 id="examples-17">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -2990,7 +3066,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-16">Possible parameters</h3>
<h3 id="possible-parameters-17">Possible parameters</h3>
<table>
<thead>
......@@ -3018,7 +3094,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-17">Examples</h3>
<h3 id="examples-18">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3041,7 +3117,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-get-occupants">Possible parameters</h3>
<h3 id="possible-parameters-18">Possible parameters</h3>
<table>
<thead>
......@@ -3069,15 +3145,16 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-get-occupants">Examples</h3>
<h3 id="examples-19">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/room1/participants">http://example.org:9090/plugins/restapi/v1/chatrooms/room1/occupants</a></p>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/room1/occupants">http://example.org:9090/plugins/restapi/v1/chatrooms/room1/occupants</a></p>
</blockquote>
<h2 id="create-a-chat-room">Create a chat room</h2>
<p>Endpoint to create a new chat room.</p>
......@@ -3091,7 +3168,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-17">Possible parameters</h3>
<h3 id="possible-parameters-19">Possible parameters</h3>
<table>
<thead>
......@@ -3126,54 +3203,54 @@ Payload Example 1 (required parameters):</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-tag">&lt;<span class="hljs-title">chatRoom</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">naturalName</span>&gt;</span>global-1<span class="hljs-tag">&lt;/<span class="hljs-title">naturalName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">roomName</span>&gt;</span>global<span class="hljs-tag">&lt;/<span class="hljs-title">roomName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">description</span>&gt;</span>Global Chat Room<span class="hljs-tag">&lt;/<span class="hljs-title">description</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">chatRoom</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="tag">&lt;chatRoom&gt;</span><span class="pln">
</span><span class="tag">&lt;naturalName&gt;</span><span class="pln">global-1</span><span class="tag">&lt;/naturalName&gt;</span><span class="pln">
</span><span class="tag">&lt;roomName&gt;</span><span class="pln">global</span><span class="tag">&lt;/roomName&gt;</span><span class="pln">
</span><span class="tag">&lt;description&gt;</span><span class="pln">Global Chat Room</span><span class="tag">&lt;/description&gt;</span><span class="pln">
</span><span class="tag">&lt;/chatRoom&gt;</span></code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-tag">&lt;<span class="hljs-title">chatRoom</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">roomName</span>&gt;</span>global<span class="hljs-tag">&lt;/<span class="hljs-title">roomName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">naturalName</span>&gt;</span>global-2<span class="hljs-tag">&lt;/<span class="hljs-title">naturalName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">description</span>&gt;</span>Global Chat Room<span class="hljs-tag">&lt;/<span class="hljs-title">description</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">subject</span>&gt;</span>global-2 Subject<span class="hljs-tag">&lt;/<span class="hljs-title">subject</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">creationDate</span>&gt;</span>2014-02-12T15:52:37.592+01:00<span class="hljs-tag">&lt;/<span class="hljs-title">creationDate</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">modificationDate</span>&gt;</span>2014-09-12T15:35:54.702+02:00<span class="hljs-tag">&lt;/<span class="hljs-title">modificationDate</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">maxUsers</span>&gt;</span>0<span class="hljs-tag">&lt;/<span class="hljs-title">maxUsers</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">persistent</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">persistent</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">publicRoom</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">publicRoom</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">registrationEnabled</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">registrationEnabled</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canAnyoneDiscoverJID</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canAnyoneDiscoverJID</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canOccupantsChangeSubject</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canOccupantsChangeSubject</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canOccupantsInvite</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canOccupantsInvite</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canChangeNickname</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canChangeNickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">logEnabled</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">logEnabled</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">loginRestrictedToNickname</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">loginRestrictedToNickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">membersOnly</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">membersOnly</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">moderated</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">moderated</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">broadcastPresenceRoles</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>moderator<span class="hljs-tag">&lt;/<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>participant<span class="hljs-tag">&lt;/<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>visitor<span class="hljs-tag">&lt;/<span class="hljs-title">broadcastPresenceRole</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">broadcastPresenceRoles</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">owners</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">owner</span>&gt;</span>owner@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">owner</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">owners</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">admins</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">admin</span>&gt;</span>admin@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">admin</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">admins</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">members</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">member</span>&gt;</span>member2@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">member</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">member</span>&gt;</span>member1@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">member</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">members</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">outcasts</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">outcast</span>&gt;</span>outcast1@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">outcast</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">outcasts</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">chatRoom</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="tag">&lt;chatRoom&gt;</span><span class="pln">
</span><span class="tag">&lt;roomName&gt;</span><span class="pln">global</span><span class="tag">&lt;/roomName&gt;</span><span class="pln">
</span><span class="tag">&lt;naturalName&gt;</span><span class="pln">global-2</span><span class="tag">&lt;/naturalName&gt;</span><span class="pln">
</span><span class="tag">&lt;description&gt;</span><span class="pln">Global Chat Room</span><span class="tag">&lt;/description&gt;</span><span class="pln">
</span><span class="tag">&lt;subject&gt;</span><span class="pln">global-2 Subject</span><span class="tag">&lt;/subject&gt;</span><span class="pln">
</span><span class="tag">&lt;creationDate&gt;</span><span class="pln">2014-02-12T15:52:37.592+01:00</span><span class="tag">&lt;/creationDate&gt;</span><span class="pln">
</span><span class="tag">&lt;modificationDate&gt;</span><span class="pln">2014-09-12T15:35:54.702+02:00</span><span class="tag">&lt;/modificationDate&gt;</span><span class="pln">
</span><span class="tag">&lt;maxUsers&gt;</span><span class="pln">0</span><span class="tag">&lt;/maxUsers&gt;</span><span class="pln">
</span><span class="tag">&lt;persistent&gt;</span><span class="pln">true</span><span class="tag">&lt;/persistent&gt;</span><span class="pln">
</span><span class="tag">&lt;publicRoom&gt;</span><span class="pln">true</span><span class="tag">&lt;/publicRoom&gt;</span><span class="pln">
</span><span class="tag">&lt;registrationEnabled&gt;</span><span class="pln">false</span><span class="tag">&lt;/registrationEnabled&gt;</span><span class="pln">
</span><span class="tag">&lt;canAnyoneDiscoverJID&gt;</span><span class="pln">false</span><span class="tag">&lt;/canAnyoneDiscoverJID&gt;</span><span class="pln">
</span><span class="tag">&lt;canOccupantsChangeSubject&gt;</span><span class="pln">false</span><span class="tag">&lt;/canOccupantsChangeSubject&gt;</span><span class="pln">
</span><span class="tag">&lt;canOccupantsInvite&gt;</span><span class="pln">false</span><span class="tag">&lt;/canOccupantsInvite&gt;</span><span class="pln">
</span><span class="tag">&lt;canChangeNickname&gt;</span><span class="pln">false</span><span class="tag">&lt;/canChangeNickname&gt;</span><span class="pln">
</span><span class="tag">&lt;logEnabled&gt;</span><span class="pln">true</span><span class="tag">&lt;/logEnabled&gt;</span><span class="pln">
</span><span class="tag">&lt;loginRestrictedToNickname&gt;</span><span class="pln">false</span><span class="tag">&lt;/loginRestrictedToNickname&gt;</span><span class="pln">
</span><span class="tag">&lt;membersOnly&gt;</span><span class="pln">false</span><span class="tag">&lt;/membersOnly&gt;</span><span class="pln">
</span><span class="tag">&lt;moderated&gt;</span><span class="pln">false</span><span class="tag">&lt;/moderated&gt;</span><span class="pln">
</span><span class="tag">&lt;broadcastPresenceRoles&gt;</span><span class="pln">
</span><span class="tag">&lt;broadcastPresenceRole&gt;</span><span class="pln">moderator</span><span class="tag">&lt;/broadcastPresenceRole&gt;</span><span class="pln">
</span><span class="tag">&lt;broadcastPresenceRole&gt;</span><span class="pln">participant</span><span class="tag">&lt;/broadcastPresenceRole&gt;</span><span class="pln">
</span><span class="tag">&lt;broadcastPresenceRole&gt;</span><span class="pln">visitor</span><span class="tag">&lt;/broadcastPresenceRole&gt;</span><span class="pln">
</span><span class="tag">&lt;/broadcastPresenceRoles&gt;</span><span class="pln">
</span><span class="tag">&lt;owners&gt;</span><span class="pln">
</span><span class="tag">&lt;owner&gt;</span><span class="pln">owner@localhost</span><span class="tag">&lt;/owner&gt;</span><span class="pln">
</span><span class="tag">&lt;/owners&gt;</span><span class="pln">
</span><span class="tag">&lt;admins&gt;</span><span class="pln">
</span><span class="tag">&lt;admin&gt;</span><span class="pln">admin@localhost</span><span class="tag">&lt;/admin&gt;</span><span class="pln">
</span><span class="tag">&lt;/admins&gt;</span><span class="pln">
</span><span class="tag">&lt;members&gt;</span><span class="pln">
</span><span class="tag">&lt;member&gt;</span><span class="pln">member2@localhost</span><span class="tag">&lt;/member&gt;</span><span class="pln">
</span><span class="tag">&lt;member&gt;</span><span class="pln">member1@localhost</span><span class="tag">&lt;/member&gt;</span><span class="pln">
</span><span class="tag">&lt;/members&gt;</span><span class="pln">
</span><span class="tag">&lt;outcasts&gt;</span><span class="pln">
</span><span class="tag">&lt;outcast&gt;</span><span class="pln">outcast1@localhost</span><span class="tag">&lt;/outcast&gt;</span><span class="pln">
</span><span class="tag">&lt;/outcasts&gt;</span><span class="pln">
</span><span class="tag">&lt;/chatRoom&gt;</span></code></pre>
......@@ -3190,65 +3267,67 @@ Payload Example 1 (required parameters):</p>
<pre class="prettyprint"><code class=" hljs json">{
"<span class="hljs-attribute">roomName</span>": <span class="hljs-value"><span class="hljs-string">"global"</span></span>,
"<span class="hljs-attribute">naturalName</span>": <span class="hljs-value"><span class="hljs-string">"global-2"</span></span>,
"<span class="hljs-attribute">description</span>": <span class="hljs-value"><span class="hljs-string">"Global chat room"</span>
</span>}</code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">{</span><span class="pln">
</span><span class="str">"roomName"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"global"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"naturalName"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"global-2"</span><span class="pun">,</span><span class="pln">
</span><span class="str">"description"</span><span class="pun">:</span><span class="pln"> </span><span class="str">"Global chat room"</span><span class="pln">
</span><span class="pun">}</span></code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class="prettyprint"><code class=" hljs autohotkey"><span class="hljs-escape">``</span><span class="hljs-escape">`
</span>{
<span class="hljs-string">"roomName"</span>: <span class="hljs-string">"global-1"</span>,
<span class="hljs-string">"naturalName"</span>: <span class="hljs-string">"global-1_test_hello"</span>,
<span class="hljs-string">"description"</span>: <span class="hljs-string">"Global chat room"</span>,
<span class="hljs-string">"subject"</span>: <span class="hljs-string">"Global chat room subject"</span>,
<span class="hljs-string">"creationDate"</span>: <span class="hljs-string">"2012-10-18T16:55:12.803+02:00"</span>,
<span class="hljs-string">"modificationDate"</span>: <span class="hljs-string">"2014-07-10T09:49:12.411+02:00"</span>,
<span class="hljs-string">"maxUsers"</span>: <span class="hljs-string">"0"</span>,
<span class="hljs-string">"persistent"</span>: <span class="hljs-string">"true"</span>,
<span class="hljs-string">"publicRoom"</span>: <span class="hljs-string">"true"</span>,
<span class="hljs-string">"registrationEnabled"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"canAnyoneDiscoverJID"</span>: <span class="hljs-string">"true"</span>,
<span class="hljs-string">"canOccupantsChangeSubject"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"canOccupantsInvite"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"canChangeNickname"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"logEnabled"</span>: <span class="hljs-string">"true"</span>,
<span class="hljs-string">"loginRestrictedToNickname"</span>: <span class="hljs-string">"true"</span>,
<span class="hljs-string">"membersOnly"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"moderated"</span>: <span class="hljs-string">"false"</span>,
<span class="hljs-string">"broadcastPresenceRoles"</span>: {
<span class="hljs-string">"broadcastPresenceRole"</span>: [
<span class="hljs-string">"moderator"</span>,
<span class="hljs-string">"participant"</span>,
<span class="hljs-string">"visitor"</span>
<pre class="prettyprint prettyprinted"><code><span class="str">```
{
"roomName": "global-1",
"naturalName": "global-1_test_hello",
"description": "Global chat room",
"subject": "Global chat room subject",
"creationDate": "2012-10-18T16:55:12.803+02:00",
"modificationDate": "2014-07-10T09:49:12.411+02:00",
"maxUsers": "0",
"persistent": "true",
"publicRoom": "true",
"registrationEnabled": "false",
"canAnyoneDiscoverJID": "true",
"canOccupantsChangeSubject": "false",
"canOccupantsInvite": "false",
"canChangeNickname": "false",
"logEnabled": "true",
"loginRestrictedToNickname": "true",
"membersOnly": "false",
"moderated": "false",
"broadcastPresenceRoles": {
"broadcastPresenceRole": [
"moderator",
"participant",
"visitor"
]
},
<span class="hljs-string">"owners"</span>: {
<span class="hljs-string">"owner"</span>: <span class="hljs-string">"owner@localhost"</span>
"owners": {
"owner": "owner@localhost"
},
<span class="hljs-string">"admins"</span>: {
<span class="hljs-string">"admin"</span>: [
<span class="hljs-string">"admin@localhost"</span>,
<span class="hljs-string">"admin2@localhost"</span>
"admins": {
"admin": [
"admin@localhost",
"admin2@localhost"
]
},
<span class="hljs-string">"members"</span>: {
<span class="hljs-string">"member"</span>: [
<span class="hljs-string">"member@localhost"</span>,
<span class="hljs-string">"member2@localhost"</span>
"members": {
"member": [
"member@localhost",
"member2@localhost"
]
},
<span class="hljs-string">"outcasts"</span>: {
<span class="hljs-string">"outcast"</span>: [
<span class="hljs-string">"outcast@localhost"</span>,
<span class="hljs-string">"outcast2@localhost"</span>
"outcasts": {
"outcast": [
"outcast@localhost",
"outcast2@localhost"
]
}
}</code></pre>
}</span></code></pre>
<h2 id="delete-a-chat-room">Delete a chat room</h2>
......@@ -3263,7 +3342,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-17">Possible parameters</h3>
<h3 id="possible-parameters-20">Possible parameters</h3>
<table>
<thead>
......@@ -3291,7 +3370,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-17">Examples</h3>
<h3 id="examples-20">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3315,7 +3394,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-18">Possible parameters</h3>
<h3 id="possible-parameters-21">Possible parameters</h3>
<table>
<thead>
......@@ -3343,7 +3422,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-18">Examples</h3>
<h3 id="examples-21">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3356,41 +3435,41 @@ Payload Example 1 (required parameters):</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-tag">&lt;<span class="hljs-title">chatRoom</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">roomName</span>&gt;</span>global<span class="hljs-tag">&lt;/<span class="hljs-title">roomName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">naturalName</span>&gt;</span>global-2<span class="hljs-tag">&lt;/<span class="hljs-title">naturalName</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">description</span>&gt;</span>Global Chat Room edit<span class="hljs-tag">&lt;/<span class="hljs-title">description</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">subject</span>&gt;</span>New subject<span class="hljs-tag">&lt;/<span class="hljs-title">subject</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">password</span>&gt;</span>test<span class="hljs-tag">&lt;/<span class="hljs-title">password</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">creationDate</span>&gt;</span>2014-02-12T15:52:37.592+01:00<span class="hljs-tag">&lt;/<span class="hljs-title">creationDate</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">modificationDate</span>&gt;</span>2014-09-12T14:20:56.286+02:00<span class="hljs-tag">&lt;/<span class="hljs-title">modificationDate</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">maxUsers</span>&gt;</span>0<span class="hljs-tag">&lt;/<span class="hljs-title">maxUsers</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">persistent</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">persistent</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">publicRoom</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">publicRoom</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">registrationEnabled</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">registrationEnabled</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canAnyoneDiscoverJID</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canAnyoneDiscoverJID</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canOccupantsChangeSubject</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canOccupantsChangeSubject</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canOccupantsInvite</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canOccupantsInvite</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">canChangeNickname</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">canChangeNickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">logEnabled</span>&gt;</span>true<span class="hljs-tag">&lt;/<span class="hljs-title">logEnabled</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">loginRestrictedToNickname</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">loginRestrictedToNickname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">membersOnly</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">membersOnly</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">moderated</span>&gt;</span>false<span class="hljs-tag">&lt;/<span class="hljs-title">moderated</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">broadcastPresenceRoles</span>/&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">owners</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">owner</span>&gt;</span>owner@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">owner</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">owners</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">admins</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">admin</span>&gt;</span>admin@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">admin</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">admins</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">members</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">member</span>&gt;</span>member2@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">member</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">member</span>&gt;</span>member1@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">member</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">members</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">outcasts</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">outcast</span>&gt;</span>outcast1@localhost<span class="hljs-tag">&lt;/<span class="hljs-title">outcast</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">outcasts</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">chatRoom</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="tag">&lt;chatRoom&gt;</span><span class="pln">
</span><span class="tag">&lt;roomName&gt;</span><span class="pln">global</span><span class="tag">&lt;/roomName&gt;</span><span class="pln">
</span><span class="tag">&lt;naturalName&gt;</span><span class="pln">global-2</span><span class="tag">&lt;/naturalName&gt;</span><span class="pln">
</span><span class="tag">&lt;description&gt;</span><span class="pln">Global Chat Room edit</span><span class="tag">&lt;/description&gt;</span><span class="pln">
</span><span class="tag">&lt;subject&gt;</span><span class="pln">New subject</span><span class="tag">&lt;/subject&gt;</span><span class="pln">
</span><span class="tag">&lt;password&gt;</span><span class="pln">test</span><span class="tag">&lt;/password&gt;</span><span class="pln">
</span><span class="tag">&lt;creationDate&gt;</span><span class="pln">2014-02-12T15:52:37.592+01:00</span><span class="tag">&lt;/creationDate&gt;</span><span class="pln">
</span><span class="tag">&lt;modificationDate&gt;</span><span class="pln">2014-09-12T14:20:56.286+02:00</span><span class="tag">&lt;/modificationDate&gt;</span><span class="pln">
</span><span class="tag">&lt;maxUsers&gt;</span><span class="pln">0</span><span class="tag">&lt;/maxUsers&gt;</span><span class="pln">
</span><span class="tag">&lt;persistent&gt;</span><span class="pln">true</span><span class="tag">&lt;/persistent&gt;</span><span class="pln">
</span><span class="tag">&lt;publicRoom&gt;</span><span class="pln">true</span><span class="tag">&lt;/publicRoom&gt;</span><span class="pln">
</span><span class="tag">&lt;registrationEnabled&gt;</span><span class="pln">false</span><span class="tag">&lt;/registrationEnabled&gt;</span><span class="pln">
</span><span class="tag">&lt;canAnyoneDiscoverJID&gt;</span><span class="pln">false</span><span class="tag">&lt;/canAnyoneDiscoverJID&gt;</span><span class="pln">
</span><span class="tag">&lt;canOccupantsChangeSubject&gt;</span><span class="pln">false</span><span class="tag">&lt;/canOccupantsChangeSubject&gt;</span><span class="pln">
</span><span class="tag">&lt;canOccupantsInvite&gt;</span><span class="pln">false</span><span class="tag">&lt;/canOccupantsInvite&gt;</span><span class="pln">
</span><span class="tag">&lt;canChangeNickname&gt;</span><span class="pln">false</span><span class="tag">&lt;/canChangeNickname&gt;</span><span class="pln">
</span><span class="tag">&lt;logEnabled&gt;</span><span class="pln">true</span><span class="tag">&lt;/logEnabled&gt;</span><span class="pln">
</span><span class="tag">&lt;loginRestrictedToNickname&gt;</span><span class="pln">false</span><span class="tag">&lt;/loginRestrictedToNickname&gt;</span><span class="pln">
</span><span class="tag">&lt;membersOnly&gt;</span><span class="pln">false</span><span class="tag">&lt;/membersOnly&gt;</span><span class="pln">
</span><span class="tag">&lt;moderated&gt;</span><span class="pln">false</span><span class="tag">&lt;/moderated&gt;</span><span class="pln">
</span><span class="tag">&lt;broadcastPresenceRoles/&gt;</span><span class="pln">
</span><span class="tag">&lt;owners&gt;</span><span class="pln">
</span><span class="tag">&lt;owner&gt;</span><span class="pln">owner@localhost</span><span class="tag">&lt;/owner&gt;</span><span class="pln">
</span><span class="tag">&lt;/owners&gt;</span><span class="pln">
</span><span class="tag">&lt;admins&gt;</span><span class="pln">
</span><span class="tag">&lt;admin&gt;</span><span class="pln">admin@localhost</span><span class="tag">&lt;/admin&gt;</span><span class="pln">
</span><span class="tag">&lt;/admins&gt;</span><span class="pln">
</span><span class="tag">&lt;members&gt;</span><span class="pln">
</span><span class="tag">&lt;member&gt;</span><span class="pln">member2@localhost</span><span class="tag">&lt;/member&gt;</span><span class="pln">
</span><span class="tag">&lt;member&gt;</span><span class="pln">member1@localhost</span><span class="tag">&lt;/member&gt;</span><span class="pln">
</span><span class="tag">&lt;/members&gt;</span><span class="pln">
</span><span class="tag">&lt;outcasts&gt;</span><span class="pln">
</span><span class="tag">&lt;outcast&gt;</span><span class="pln">outcast1@localhost</span><span class="tag">&lt;/outcast&gt;</span><span class="pln">
</span><span class="tag">&lt;/outcasts&gt;</span><span class="pln">
</span><span class="tag">&lt;/chatRoom&gt;</span></code></pre>
......@@ -3407,7 +3486,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="possible-parameters-19">Possible parameters</h3>
<h3 id="possible-parameters-22">Possible parameters</h3>
<table>
<thead>
......@@ -3447,7 +3526,7 @@ Payload Example 1 (required parameters):</p>
<h3 id="examples-19">Examples</h3>
<h3 id="examples-22">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3463,6 +3542,74 @@ Payload Example 1 (required parameters):</p>
<h2 id="add-group-with-role-to-chat-room">Add group with role to chat room</h2>
<p>Endpoint to add a new group with role to a room.</p>
<blockquote>
<p><strong>POST</strong> /chatrooms/{roomName}/{roles}/group/{name}</p>
</blockquote>
<p><strong>Payload:</strong> none <br>
<strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-23">Possible parameters</h3>
<table>
<thead>
<tr>
<th>Parameter</th>
<th>Parameter Type</th>
<th>Description</th>
<th>Default value</th>
</tr>
</thead>
<tbody><tr>
<td>roomname</td>
<td>@Path</td>
<td>Exact room name</td>
<td></td>
</tr>
<tr>
<td>name</td>
<td>@Path</td>
<td>The group name</td>
<td></td>
</tr>
<tr>
<td>roles</td>
<td>@Path</td>
<td>Available roles: <br><strong>owners</strong> <br> <strong>admins</strong> <br> <strong>members</strong> <br> <strong>outcasts</strong></td>
<td></td>
</tr>
<tr>
<td>servicename</td>
<td>@QueryParam</td>
<td>The name of the Group Chat Service</td>
<td>conference</td>
</tr>
</tbody></table>
<h3 id="examples-23">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
<strong>Header:</strong> Content-Type application/xml</p>
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/group/testGroup">http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/group/testGroup</a> <br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/global/admins/group/testGroup">http://example.org:9090/plugins/restapi/v1/chatrooms/global/admins/group/testGroup</a> <br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/global/members/group/testGroup">http://example.org:9090/plugins/restapi/v1/chatrooms/global/members/group/testGroup</a> <br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/global/outcasts/group/testGroup">http://example.org:9090/plugins/restapi/v1/chatrooms/global/outcasts/group/testGroup</a> <br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/group/testUser?servicename=privateconf">http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/group/testUser?servicename=privateconf</a></p>
</blockquote>
<h2 id="delete-a-user-from-a-chat-room">Delete a user from a chat room</h2>
<p>Endpoint to remove a room user role. <br>
......@@ -3473,7 +3620,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-20">Possible parameters</h3>
<h3 id="possible-parameters-24">Possible parameters</h3>
<table>
<thead>
......@@ -3513,7 +3660,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-20">Examples</h3>
<h3 id="examples-24">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3546,7 +3693,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-21">Examples</h3>
<h3 id="examples-25">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3569,7 +3716,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-21">Possible parameters</h3>
<h3 id="possible-parameters-25">Possible parameters</h3>
<table>
<thead>
......@@ -3591,7 +3738,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-22">Examples</h3>
<h3 id="examples-26">Examples</h3>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3612,7 +3759,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-23">Examples</h3>
<h3 id="examples-27">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3625,8 +3772,8 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"propertyName"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"propertyValue"</span>/&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"propertyName"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"propertyValue"</span><span class="tag">/&gt;</span></code></pre>
......@@ -3643,7 +3790,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-22">Possible parameters</h3>
<h3 id="possible-parameters-26">Possible parameters</h3>
<table>
<thead>
......@@ -3665,7 +3812,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-24">Examples</h3>
<h3 id="examples-28">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3688,7 +3835,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-23">Possible parameters</h3>
<h3 id="possible-parameters-27">Possible parameters</h3>
<table>
<thead>
......@@ -3710,7 +3857,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-25">Examples</h3>
<h3 id="examples-29">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3723,8 +3870,8 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">property</span> <span class="hljs-attribute">key</span>=<span class="hljs-value">"propertyName"</span> <span class="hljs-attribute">value</span>=<span class="hljs-value">"anotherValue"</span>/&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;property</span><span class="pln"> </span><span class="atn">key</span><span class="pun">=</span><span class="atv">"propertyName"</span><span class="pln"> </span><span class="atn">value</span><span class="pun">=</span><span class="atv">"anotherValue"</span><span class="tag">/&gt;</span></code></pre>
......@@ -3741,7 +3888,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-26">Examples</h3>
<h3 id="examples-30">Examples</h3>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3766,7 +3913,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-27">Examples</h3>
<h3 id="examples-31">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3789,7 +3936,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-24">Possible parameters</h3>
<h3 id="possible-parameters-28">Possible parameters</h3>
<table>
<thead>
......@@ -3811,7 +3958,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-28">Examples</h3>
<h3 id="examples-32">Examples</h3>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3832,7 +3979,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-29">Examples</h3>
<h3 id="examples-33">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3845,11 +3992,11 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">group</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">name</span>&gt;</span>GroupName<span class="hljs-tag">&lt;/<span class="hljs-title">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">description</span>&gt;</span>Some description<span class="hljs-tag">&lt;/<span class="hljs-title">description</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">group</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;group&gt;</span><span class="pln">
</span><span class="tag">&lt;name&gt;</span><span class="pln">GroupName</span><span class="tag">&lt;/name&gt;</span><span class="pln">
</span><span class="tag">&lt;description&gt;</span><span class="pln">Some description</span><span class="tag">&lt;/description&gt;</span><span class="pln">
</span><span class="tag">&lt;/group&gt;</span></code></pre>
......@@ -3866,7 +4013,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-25">Possible parameters</h3>
<h3 id="possible-parameters-29">Possible parameters</h3>
<table>
<thead>
......@@ -3888,7 +4035,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-30">Examples</h3>
<h3 id="examples-34">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3911,7 +4058,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-26">Possible parameters</h3>
<h3 id="possible-parameters-30">Possible parameters</h3>
<table>
<thead>
......@@ -3933,7 +4080,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-31">Examples</h3>
<h3 id="examples-35">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU= <br>
......@@ -3946,11 +4093,11 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">group</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">name</span>&gt;</span>groupNameToUpdate<span class="hljs-tag">&lt;/<span class="hljs-title">name</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">description</span>&gt;</span>New description<span class="hljs-tag">&lt;/<span class="hljs-title">description</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">group</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;group&gt;</span><span class="pln">
</span><span class="tag">&lt;name&gt;</span><span class="pln">groupNameToUpdate</span><span class="tag">&lt;/name&gt;</span><span class="pln">
</span><span class="tag">&lt;description&gt;</span><span class="pln">New description</span><span class="tag">&lt;/description&gt;</span><span class="pln">
</span><span class="tag">&lt;/group&gt;</span></code></pre>
......@@ -3971,7 +4118,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-32">Examples</h3>
<h3 id="examples-36">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -3994,7 +4141,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-27">Possible parameters</h3>
<h3 id="possible-parameters-31">Possible parameters</h3>
<table>
<thead>
......@@ -4016,7 +4163,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-33">Examples</h3>
<h3 id="examples-37">Examples</h3>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -4037,7 +4184,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="possible-parameters-28">Possible parameters</h3>
<h3 id="possible-parameters-32">Possible parameters</h3>
<table>
<thead>
......@@ -4059,7 +4206,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-34">Examples</h3>
<h3 id="examples-38">Examples</h3>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -4084,7 +4231,7 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<h3 id="examples-35">Examples</h3>
<h3 id="examples-39">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
......@@ -4096,10 +4243,10 @@ DELETE /chatrooms/{roomName}/{roles}/{name}</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-pi">&lt;?xml version="1.0" encoding="UTF-8" standalone="yes"?&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">message</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">body</span>&gt;</span>Your message<span class="hljs-tag">&lt;/<span class="hljs-title">body</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">message</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="pun">&lt;?</span><span class="pln">xml version</span><span class="pun">=</span><span class="str">"1.0"</span><span class="pln"> encoding</span><span class="pun">=</span><span class="str">"UTF-8"</span><span class="pln"> standalone</span><span class="pun">=</span><span class="str">"yes"</span><span class="pun">?&gt;</span><span class="pln">
</span><span class="tag">&lt;message&gt;</span><span class="pln">
</span><span class="tag">&lt;body&gt;</span><span class="pln">Your message</span><span class="tag">&lt;/body&gt;</span><span class="pln">
</span><span class="tag">&lt;/message&gt;</span></code></pre>
......@@ -4238,10 +4385,10 @@ Which replies an XML group list formatted like this:</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-tag">&lt;<span class="hljs-title">result</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>group1<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>group2<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">result</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="tag">&lt;result&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">group1</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">group2</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;/result&gt;</span></code></pre>
<p>The following example gets all groups for a specific user</p>
......@@ -4250,10 +4397,10 @@ Which replies an XML group list formatted like this:</p>
<pre class="prettyprint"><code class=" hljs xml"><span class="hljs-tag">&lt;<span class="hljs-title">result</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>usergroup1<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;<span class="hljs-title">groupname</span>&gt;</span>usergroup2<span class="hljs-tag">&lt;/<span class="hljs-title">groupname</span>&gt;</span>
<span class="hljs-tag">&lt;/<span class="hljs-title">result</span>&gt;</span></code></pre>
<pre class="prettyprint prettyprinted"><code><span class="tag">&lt;result&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">usergroup1</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;groupname&gt;</span><span class="pln">usergroup2</span><span class="tag">&lt;/groupname&gt;</span><span class="pln">
</span><span class="tag">&lt;/result&gt;</span></code></pre>
<p>* When sending double characters (Chinese/Japanese/Korean etc) you should URLEncode the string as utf8. <br>
In Java this is done like this <br>
......@@ -4679,6 +4826,44 @@ If the strings are encoded incorrectly, double byte characters will look garbele
......
......@@ -13,6 +13,7 @@ import org.jivesoftware.openfire.group.GroupNotFoundException;
import org.jivesoftware.openfire.plugin.rest.entity.GroupEntity;
import org.jivesoftware.openfire.plugin.rest.exceptions.ExceptionType;
import org.jivesoftware.openfire.plugin.rest.exceptions.ServiceException;
import org.jivesoftware.openfire.plugin.rest.utils.MUCRoomUtils;
/**
* The Class GroupController.
......@@ -65,7 +66,11 @@ public class GroupController {
throw new ServiceException("Could not find group", groupName, ExceptionType.GROUP_NOT_FOUND,
Response.Status.NOT_FOUND, e);
}
GroupEntity groupEntity = new GroupEntity(group.getName(), group.getDescription());
groupEntity.setAdmins(MUCRoomUtils.convertJIDsToStringList(group.getAdmins()));
groupEntity.setMembers(MUCRoomUtils.convertJIDsToStringList(group.getMembers()));
return groupEntity;
}
......
package org.jivesoftware.openfire.plugin.rest.entity;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
......@@ -8,7 +11,7 @@ import javax.xml.bind.annotation.XmlType;
* The Class GroupEntity.
*/
@XmlRootElement(name = "group")
@XmlType(propOrder = { "name", "description" })
@XmlType(propOrder = { "name", "description", "admins", "members" })
public class GroupEntity {
/** The name. */
......@@ -17,6 +20,12 @@ public class GroupEntity {
/** The description. */
private String description;
/** The admins. */
private List<String> admins;
/** The members. */
private List<String> members;
/**
* Instantiates a new group entity.
*/
......@@ -76,4 +85,44 @@ public class GroupEntity {
this.description = description;
}
/**
* Gets the admins.
*
* @return the admins
*/
@XmlElementWrapper(name = "admins")
@XmlElement(name = "admin")
public List<String> getAdmins() {
return admins;
}
/**
* Gets the members.
*
* @return the members
*/
@XmlElementWrapper(name = "members")
@XmlElement(name = "member")
public List<String> getMembers() {
return members;
}
/**
* Sets the admins.
*
* @param admins the new admins
*/
public void setAdmins(List<String> admins) {
this.admins = admins;
}
/**
* Sets the members.
*
* @param members the new members
*/
public void setMembers(List<String> members) {
this.members = members;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment