-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
readme.html
2920 lines (2858 loc) · 219 KB
/
readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>test</title>
<link rel="stylesheet" href="https://stackedit.io/style.css" />
</head>
<body class="stackedit">
<div class="stackedit__left">
<div class="stackedit__toc">
<ul>
<li><a href="#rest-api-plugin-readme">REST API Plugin Readme</a>
<ul>
<li><a href="#ci-build-status">CI Build Status</a></li>
<li><a href="#reporting-issues">Reporting Issues</a></li>
<li><a href="#feature-list">Feature list</a></li>
<li><a href="#available-rest-api-clients">Available REST API clients</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#explanation-of-rest">Explanation of REST</a></li>
<li><a href="#authentication">Authentication</a></li>
</ul>
</li>
<li><a href="#user-related-rest-endpoints">User related REST Endpoints</a>
<ul>
<li><a href="#retrieve-users">Retrieve users</a></li>
<li><a href="#retrieve-a-user-endpoint-to-get-information-over-a-specific-user">Retrieve a user Endpoint to get information over a specific user</a></li>
<li><a href="#create-a-user">Create a user</a></li>
<li><a href="#delete-a-user">Delete a user</a></li>
<li><a href="#update-a-user">Update a user</a></li>
<li><a href="#retrieve-all-user-groups-endpoint-to-get-group-names-of-a-specific-user">Retrieve all user groups Endpoint to get group names of a specific user</a></li>
<li><a href="#add-user-to-groups">Add user to groups</a></li>
<li><a href="#add-user-to-group">Add user to group</a></li>
<li><a href="#delete-a-user-from-a-groups">Delete a user from a groups</a></li>
<li><a href="#delete-a-user-from-a-group">Delete a user from a group</a></li>
<li><a href="#lockout-a-user">Lockout a user</a></li>
<li><a href="#unlock-a-user-endpoint-to-unlock--unban-the-user">Unlock a user Endpoint to unlock / unban the user</a></li>
<li><a href="#retrieve-user-roster-endpoint-to-get-roster-entries-buddies-from-a-specific-user">Retrieve user roster Endpoint to get roster entries (buddies) from a specific user</a></li>
<li><a href="#create-a-user-roster-entry-endpoint-to-add-a-new-roster-entry-to-a-user">Create a user roster entry Endpoint to add a new roster entry to a user</a></li>
<li><a href="#delete-a-user-roster-entry-endpoint-to-remove-a-roster-entry-from-a-user">Delete a user roster entry Endpoint to remove a roster entry from a user</a></li>
<li><a href="#update-a-user-roster-entry-endpoint-to-update-a-roster-entry">Update a user roster entry Endpoint to update a roster entry</a></li>
</ul>
</li>
<li><a href="#chat-room-related-rest-endpoints">Chat room related REST Endpoints</a>
<ul>
<li><a href="#retrieve-all-chat-services">Retrieve all chat services</a></li>
<li><a href="#create-a-chat-service">Create a chat service</a></li>
<li><a href="#retrieve-all-chat-rooms-endpoint-to-get-all-chat-rooms">Retrieve all chat rooms Endpoint to get all chat rooms</a></li>
<li><a href="#retrieve-a-chat-room">Retrieve a chat room</a></li>
<li><a href="#retrieve-chat-room-participants-endpoint-to-get-all-participants-with-a-role-of-specified-room.">Retrieve chat room participants Endpoint to get all participants with a role of specified room.</a></li>
<li><a href="#retrieve-chat-room-occupants">Retrieve chat room occupants</a></li>
<li><a href="#retrieve-chat-room-message-history">Retrieve chat room message history</a></li>
<li><a href="#create-a-chat-room">Create a chat room</a></li>
<li><a href="#create-multiple-chat-room">Create multiple chat room</a></li>
<li><a href="#delete-a-chat-room-endpoint-to-delete-a-chat-room.">Delete a chat room Endpoint to delete a chat room.</a></li>
<li><a href="#update-a-chat-room-endpoint-to-update-a-chat-room.">Update a chat room Endpoint to update a chat room.</a></li>
<li><a href="#invite-user-or-user-group-to-a-chat-room">Invite user or user group to a chat Room</a></li>
<li><a href="#invite-multiple-users-andor-user-groups-to-a-chat-room">Invite multiple users and/or user groups to a chat Room</a></li>
<li><a href="#get-all-users-with-a-particular-affiliation-in-a-chat-room">Get all users with a particular affiliation in a chat room</a></li>
<li><a href="#add-user-with-affiliation-to-chat-room">Add user with affiliation to chat room</a></li>
<li><a href="#replace-all-users-with-a-affiliation-in-a-chat-room">Replace all users with a affiliation in a chat room</a></li>
<li><a href="#add-multiple-users-with-a-affiliation-to-a-chat-room">Add multiple users with a affiliation to a chat room</a></li>
<li><a href="#add-group-with-affiliation-to-chat-room">Add group with affiliation to chat room</a></li>
<li><a href="#delete-a-user-from-a-chat-room-endpoint-to-remove-a-room-user-affiliation.">Delete a user from a chat room Endpoint to remove a room user affiliation.</a></li>
</ul>
</li>
<li><a href="#system-related-rest-endpoints">System related REST Endpoints</a>
<ul>
<li><a href="#retrieve-all-system-properties-endpoint-to-get-all-system-properties">Retrieve all system properties Endpoint to get all system properties</a></li>
<li><a href="#retrieve-system-property-endpoint-to-get-information-over-specific-system-property">Retrieve system property Endpoint to get information over specific system property</a></li>
<li><a href="#create-a-system-property-endpoint-to-create-a-system-property">Create a system property Endpoint to create a system property</a></li>
<li><a href="#delete-a-system-property">Delete a system property</a></li>
<li><a href="#update-a-system-property">Update a system property</a></li>
<li><a href="#retrieve-concurrent-sessions">Retrieve concurrent sessions</a></li>
<li><a href="#check-the-liveness-state-using-all-checks">Check the ‘liveness’ state (using all checks)</a></li>
<li><a href="#perform-deadlock-liveness-check">Perform ‘deadlock’ liveness check</a></li>
<li><a href="#perform-properties-liveness-check">Perform ‘properties’ liveness check</a></li>
<li><a href="#check-the-readiness-state-using-all-checks">Check the ‘readiness’ state (using all checks)</a></li>
<li><a href="#perform-server-readiness-check">Perform ‘server’ readiness check</a></li>
<li><a href="#perform-cluster-readiness-check">Perform ‘cluster’ readiness check</a></li>
<li><a href="#perform-plugins-readiness-check">Perform ‘plugins’ readiness check</a></li>
<li><a href="#perform-connections-readiness-check">Perform ‘connections’ readiness check</a></li>
</ul>
</li>
<li><a href="#group-related-rest-endpoints">Group related REST Endpoints</a>
<ul>
<li><a href="#retrieve-all-groups-endpoint-to-get-all-groups">Retrieve all groups Endpoint to get all groups</a></li>
<li><a href="#retrieve-a-group-endpoint-to-get-information-over-specific-group">Retrieve a group Endpoint to get information over specific group</a></li>
<li><a href="#create-a-group-endpoint-to-create-a-new-group">Create a group Endpoint to create a new group</a></li>
<li><a href="#delete-a-group">Delete a group</a></li>
<li><a href="#update-a-group">Update a group</a></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></li>
<li><a href="#retrieve-the-user-sessions">Retrieve the user sessions</a></li>
<li><a href="#close-all-user-sessions">Close all user sessions</a></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></li>
</ul>
</li>
<li><a href="#security-audit-related-rest-endpoints">Security Audit related REST Endpoints</a>
<ul>
<li><a href="#retrieve-the-security-audit-logs">Retrieve the Security audit logs</a></li>
</ul>
</li>
<li><a href="#clustering-related-rest-endpoints">Clustering related REST Endpoints</a>
<ul>
<li><a href="#retrieve-information-for-all-cluster-nodes.">Retrieve information for all cluster nodes.</a></li>
<li><a href="#retrieve-information-for-a-specific-cluster-node.">Retrieve information for a specific cluster node.</a></li>
<li><a href="#retrieve-the-clustering-status">Retrieve the Clustering status</a></li>
</ul>
</li>
<li><a href="#data-format">Data format</a>
<ul>
<li><a href="#data-types">Data types</a></li>
</ul>
</li>
<li><a href="#deprecated-user-service-plugin-readme">(Deprecated) User Service Plugin Readme</a>
<ul>
<li><a href="#overview">Overview</a></li>
<li><a href="#installation-1">Installation</a></li>
<li><a href="#configuration">Configuration</a></li>
<li><a href="#using-the-plugin">Using the Plugin</a></li>
<li><a href="#sample-html">Sample HTML</a></li>
<li><a href="#server-reply">Server Reply</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="stackedit__right">
<div class="stackedit__html">
<h1 id="rest-api-plugin-readme">REST API Plugin Readme</h1>
<p>The REST API Plugin provides the ability to manage Openfire by sending an REST/HTTP request to the server. This plugin’s functionality is useful for applications that need to administer Openfire outside of the Openfire admin console.</p>
<h2 id="ci-build-status">CI Build Status</h2>
<p><a href="https://github.com/igniterealtime/openfire-restAPI-plugin/actions"><img src="https://github.com/igniterealtime/openfire-restAPI-plugin/workflows/Java%20CI/badge.svg" alt="Build Status"></a></p>
<h2 id="reporting-issues">Reporting Issues</h2>
<p>Issues may be reported to the <a href="https://discourse.igniterealtime.org">forums</a> or via this repo’s <a href="https://github.com/igniterealtime/openfire-restAPI-plugin">Github Issues</a>.</p>
<h2 id="feature-list">Feature list</h2>
<ul>
<li>Get overview over all or specific user and to create, update or delete a user</li>
<li>Get overview over all or specific group and to create, update or delete a group</li>
<li>Get overview over all user roster entries and to add, update or delete a roster entry</li>
<li>Add user to a group and remove a user from a group</li>
<li>Lockout, unlock or kick the user (enable / disable)</li>
<li>Get overview over all or specific system properties and to create, update or delete system property</li>
<li>Get overview over all or specific chat room and to create, update or delete a chat room</li>
<li>Get overview over all or specific user sessions</li>
<li>Send broadcast message to all online users</li>
<li>Get overview of all or specific security audit logs</li>
<li>Get chat message history from a multi user chat room</li>
<li>Get clustering status of Openfire</li>
<li>Get overview of ‘readiness’ and ‘liveness’ state of Openfire</li>
</ul>
<h2 id="available-rest-api-clients">Available REST API clients</h2>
<p>REST API clients are implementations of the REST API in a specific programming language.</p>
<h3 id="official">Official</h3>
<ul>
<li>JAVA: <a href="https://github.com/igniterealtime/REST-API-Client">https://github.com/igniterealtime/REST-API-Client</a></li>
</ul>
<h3 id="third-party">Third party</h3>
<ul>
<li>PHP: <a href="https://github.com/gidkom/php-openfire-restapi">https://github.com/gidkom/php-openfire-restapi</a> (partly implemented)</li>
<li>PHP: <a href="https://github.com/gnello/php-openfire-restapi">https://github.com/gnello/php-openfire-restapi</a> (partly implemented)</li>
<li>GO Lang: <a href="https://github.com/Urethramancer/fireman">https://github.com/Urethramancer/fireman</a> (partly implemented)</li>
<li>Python: <a href="https://github.com/seamus-45/openfire-restapi">https://github.com/seamus-45/openfire-restapi</a> (partly implemented)</li>
</ul>
<h2 id="installation">Installation</h2>
<p>Copy restAPI.jar into the plugins directory of your Openfire server. The plugin will be automatically deployed. To upgrade to a newer version, overwrite the restAPI.jar file with the new one.</p>
<p>
<b>Important Step:</b> To enable the plugin make sure to set the system property <code>adminConsole.access.allow-wildcards-in-excludes</code> to <code>true</code>.
Without the above step the REST API plugin always <a href="https://discourse.igniterealtime.org/t/when-i-upload-to-4-7-5-the-restapi-always-redirect/92892">redirects to login</a>
This was done in response to a <a href="https://discourse.igniterealtime.org/t/cve-2023-32315-openfire-administration-console-authentication-bypass/92869">security issue</a>
</p>
<h2 id="explanation-of-rest">Explanation of REST</h2>
<p>To provide a standard way of accessing the data the plugin is using REST.</p>
<table>
<thead>
<tr>
<th>HTTP Method</th>
<th>Usage</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>GET</strong></td>
<td>Receive a read-only data</td>
</tr>
<tr>
<td><strong>PUT</strong></td>
<td>Overwrite an existing resource</td>
</tr>
<tr>
<td><strong>POST</strong></td>
<td>Creates a new resource</td>
</tr>
<tr>
<td><strong>DELETE</strong></td>
<td>Deletes the given resource</td>
</tr>
</tbody>
</table><h2 id="authentication">Authentication</h2>
<p>All REST Endpoint are secured and must be authenticated. There are two ways to authenticate:</p>
<ul>
<li><a href="http://en.wikipedia.org/wiki/Basic_access_authentication">Basic HTTP Authentication</a></li>
<li>Shared secret key</li>
</ul>
<p>The configuration can be done in Openfire Admin console under Server > Server Settings > REST API.</p>
<h3 id="basic-http-authentication">Basic HTTP Authentication</h3>
<p>To access the endpoints is that required to send the Username and Password of a Openfire Admin account in your HTTP header request.</p>
<p>E.g., for username: admin and password: 12345:</p>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
</blockquote>
<h3 id="shared-secret-key">Shared secret key</h3>
<p>To access the endpoints is that required to send the secret key in your header request.<br>
The secret key can be defined in Openfire Admin console under Server > Server Settings > REST API.</p>
<p>E.g.</p>
<blockquote>
<p><strong>Header:</strong> Authorization: s3cretKey</p>
</blockquote>
<h1 id="user-related-rest-endpoints">User related REST Endpoints</h1>
<h2 id="retrieve-users">Retrieve users</h2>
<p>Endpoint to get all or filtered users</p>
<blockquote>
<p><strong>GET</strong> /users</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Users</p>
<h3 id="possible-parameters">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>search</td>
<td>@QueryParam</td>
<td>Search/Filter by username. <br> This act like the wildcard search %String%</td>
<td></td>
</tr>
<tr>
<td>propertyKey</td>
<td>@QueryParam</td>
<td>Filter by user propertyKey.</td>
<td></td>
</tr>
<tr>
<td>propertyValue</td>
<td>@QueryParam</td>
<td>Filter by user propertyKey and propertyValue. <br><strong>Note:</strong> It can only be used within propertyKey parameter</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
</blockquote>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users">http://example.org:9090/plugins/restapi/v1/users</a></p>
</blockquote>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users?search=testuser">http://example.org:9090/plugins/restapi/v1/users?search=testuser</a></p>
</blockquote>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users?propertyKey=keyname">http://example.org:9090/plugins/restapi/v1/users?propertyKey=keyname</a></p>
</blockquote>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users?propertyKey=keyname&propertyValue=keyvalue">http://example.org:9090/plugins/restapi/v1/users?propertyKey=keyname&propertyValue=keyvalue</a></p>
</blockquote>
<p>If you want to get a JSON format result, please add “<strong>Accept: application/json</strong>” to the <strong>Header</strong>.</p>
<h2 id="retrieve-a-user-endpoint-to-get-information-over-a-specific-user">Retrieve a user Endpoint to get information over a specific user</h2>
<blockquote>
<p><strong>GET</strong> /users/{username}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> User</p>
<h3 id="possible-parameters-1">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-1">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser">http://example.org:9090/plugins/restapi/v1/users/testuser</a></p>
</blockquote>
<h2 id="create-a-user">Create a user</h2>
<p>Endpoint to create a new user</p>
<blockquote>
<p><strong>POST</strong> /users</p>
</blockquote>
<p><strong>Payload:</strong> User<br>
<strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="examples-2">Examples</h3>
<h4 id="xml-examples">XML Examples</h4>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>Header:</strong> Content-Type: application/<strong>xml</strong></p>
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/users">http://example.org:9090/plugins/restapi/v1/users</a></p>
</blockquote>
<p><strong>Payload Example 1 (required parameters):</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>user</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>username</span><span class="token punctuation">></span></span>test3<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>username</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>password</span><span class="token punctuation">></span></span>p4ssword<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>password</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>user</span><span class="token punctuation">></span></span>
</code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>user</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>username</span><span class="token punctuation">></span></span>testuser<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>username</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>password</span><span class="token punctuation">></span></span>p4ssword<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>password</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>name</span><span class="token punctuation">></span></span>Test User<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>name</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>email</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>email</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>properties</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>keyname<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>value<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>anotherkey<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>value<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>properties</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>user</span><span class="token punctuation">></span></span>
</code></pre>
<h4 id="json-examples">JSON Examples</h4>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type: application/<strong>json</strong><br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/users">http://example.org:9090/plugins/restapi/v1/users</a></p>
</blockquote>
</blockquote>
<p><strong>Payload Example 1 (required parameters):</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"admin"</span><span class="token punctuation">,</span> <span class="token string">"password"</span><span class="token punctuation">:</span> <span class="token string">"p4ssword"</span><span class="token punctuation">}</span>
</code></pre>
<p><strong>Payload Example 2 (available parameters):</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"admin"</span><span class="token punctuation">,</span> <span class="token string">"password"</span><span class="token punctuation">:</span> <span class="token string">"p4ssword"</span><span class="token punctuation">,</span> <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"Administrator"</span><span class="token punctuation">,</span> <span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"[email protected]"</span><span class="token punctuation">,</span> <span class="token string">"properties"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span> <span class="token string">"property"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token string">"@key"</span><span class="token punctuation">:</span> <span class="token string">"console.rows_per_page"</span><span class="token punctuation">,</span> <span class="token string">"@value"</span><span class="token punctuation">:</span> <span class="token string">"user-summary=8"</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token string">"@key"</span><span class="token punctuation">:</span> <span class="token string">"console.order"</span><span class="token punctuation">,</span> <span class="token string">"@value"</span><span class="token punctuation">:</span> <span class="token string">"session-summary=1"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">}</span>
</code></pre>
<p><strong>REST API Version 1.3.0 and later - Payload Example 3 (available parameters):</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"users"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"admin"</span><span class="token punctuation">,</span> <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"Administrator"</span><span class="token punctuation">,</span> <span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"[email protected]"</span><span class="token punctuation">,</span> <span class="token string">"password"</span><span class="token punctuation">:</span> <span class="token string">"p4ssword"</span><span class="token punctuation">,</span> <span class="token string">"properties"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token string">"key"</span><span class="token punctuation">:</span> <span class="token string">"console.order"</span><span class="token punctuation">,</span> <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"session-summary=0"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span> <span class="token punctuation">}</span><span class="token punctuation">,</span> <span class="token punctuation">{</span> <span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"test"</span><span class="token punctuation">,</span> <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"Test"</span><span class="token punctuation">,</span> <span class="token string">"password"</span><span class="token punctuation">:</span> <span class="token string">"p4ssword"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">}</span>
</code></pre>
<h2 id="delete-a-user">Delete a user</h2>
<p>Endpoint to delete a user</p>
<blockquote>
<p><strong>DELETE</strong> /users/{username}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-2">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-3">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>DELETE</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser">http://example.org:9090/plugins/restapi/v1/users/testuser</a></p>
</blockquote>
</blockquote>
<h2 id="update-a-user">Update a user</h2>
<p>Endpoint to update / rename a user</p>
<blockquote>
<p><strong>PUT</strong> /users/{username}</p>
</blockquote>
<p><strong>Payload:</strong> User</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-3">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-4">Examples</h3>
<h4 id="xml-example">XML Example</h4>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>PUT</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser">http://example.org:9090/plugins/restapi/v1/users/testuser</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>user</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>username</span><span class="token punctuation">></span></span>testuser<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>username</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>name</span><span class="token punctuation">></span></span>Test User edit<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>name</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>email</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>email</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>properties</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>keyname<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>value<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>properties</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>user</span><span class="token punctuation">></span></span>
</code></pre>
<h4 id="rename-example">Rename Example</h4>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>PUT</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/oldUsername">http://example.org:9090/plugins/restapi/v1/users/oldUsername</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>user</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>username</span><span class="token punctuation">></span></span>newUsername<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>username</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>name</span><span class="token punctuation">></span></span>Test User edit<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>name</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>email</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>email</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>properties</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>property</span> <span class="token attr-name">key</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>keyname<span class="token punctuation">"</span></span> <span class="token attr-name">value</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>value<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>properties</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>user</span><span class="token punctuation">></span></span>
</code></pre>
<h4 id="json-example">JSON Example</h4>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/json<br>
<strong>PUT</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser">http://example.org:9090/plugins/restapi/v1/users/testuser</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"testuser"</span><span class="token punctuation">,</span> <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"Test User edit"</span><span class="token punctuation">,</span> <span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"[email protected]"</span><span class="token punctuation">,</span> <span class="token string">"properties"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span> <span class="token string">"property"</span><span class="token punctuation">:</span> <span class="token punctuation">{</span> <span class="token string">"@key"</span><span class="token punctuation">:</span> <span class="token string">"keyname"</span><span class="token punctuation">,</span> <span class="token string">"@value"</span><span class="token punctuation">:</span> <span class="token string">"value"</span> <span class="token punctuation">}</span> <span class="token punctuation">}</span><span class="token punctuation">}</span>
</code></pre>
<p><strong>REST API Version 1.3.0 and later - Payload Example 2 (available parameters):</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"username"</span><span class="token punctuation">:</span> <span class="token string">"testuser"</span><span class="token punctuation">,</span> <span class="token string">"name"</span><span class="token punctuation">:</span> <span class="token string">"Test User edit"</span><span class="token punctuation">,</span> <span class="token string">"email"</span><span class="token punctuation">:</span> <span class="token string">"[email protected]"</span><span class="token punctuation">,</span> <span class="token string">"properties"</span><span class="token punctuation">:</span> <span class="token punctuation">[</span> <span class="token punctuation">{</span> <span class="token string">"key"</span><span class="token punctuation">:</span> <span class="token string">"keyname"</span><span class="token punctuation">,</span> <span class="token string">"value"</span><span class="token punctuation">:</span> <span class="token string">"value"</span> <span class="token punctuation">}</span> <span class="token punctuation">]</span><span class="token punctuation">}</span>
</code></pre>
<h2 id="retrieve-all-user-groups-endpoint-to-get-group-names-of-a-specific-user">Retrieve all user groups Endpoint to get group names of a specific user</h2>
<blockquote>
<p><strong>GET</strong> /users/{username}/groups</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Groups</p>
<h3 id="possible-parameters-4">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-5">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/groups">http://example.org:9090/plugins/restapi/v1/users/testuser/groups</a></p>
</blockquote>
</blockquote>
<h2 id="add-user-to-groups">Add user to groups</h2>
<p>Endpoint to add user to a groups</p>
<blockquote>
<p><strong>POST</strong> /users/{username}/groups</p>
</blockquote>
<p><strong>Payload:</strong> Groups</p>
<p><strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-5">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-6">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/groups">http://example.org:9090/plugins/restapi/v1/users/testuser/groups</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groups</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupname</span><span class="token punctuation">></span></span>Admins<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupname</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupname</span><span class="token punctuation">></span></span>Support<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupname</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groups</span><span class="token punctuation">></span></span>
</code></pre>
<h2 id="add-user-to-group">Add user to group</h2>
<p>Endpoint to add user to a group</p>
<blockquote>
<p><strong>POST</strong> /users/{username}/groups/{groupName}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-6">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
<tr>
<td>groupName</td>
<td>@Path</td>
<td>Exact group name</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-7">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<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>
</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>
<blockquote>
<p><strong>DELETE</strong> /users/{username}/groups</p>
</blockquote>
<p><strong>Payload:</strong> Groups</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-7">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-8">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>DELETE</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/groups">http://example.org:9090/plugins/restapi/v1/users/testuser/groups</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groups</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupname</span><span class="token punctuation">></span></span>Admins<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupname</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groupname</span><span class="token punctuation">></span></span>Support<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groupname</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groups</span><span class="token punctuation">></span></span>
</code></pre>
<h2 id="delete-a-user-from-a-group">Delete a user from a group</h2>
<p>Endpoint to remove a user from a group</p>
<blockquote>
<p><strong>DELETE</strong> /users/{username}/groups/{groupName}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-8">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
<tr>
<td>groupName</td>
<td>@Path</td>
<td>Exact group name</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-9">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<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>
</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>
<blockquote>
<p><strong>POST</strong> /lockouts/{username}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-9">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-10">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/lockouts/testuser">http://example.org:9090/plugins/restapi/v1/lockouts/testuser</a></p>
</blockquote>
</blockquote>
<h2 id="unlock-a-user-endpoint-to-unlock--unban-the-user">Unlock a user Endpoint to unlock / unban the user</h2>
<blockquote>
<p><strong>DELETE</strong> /lockouts/{username}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-10">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-11">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>DELETE</strong> <a href="http://example.org:9090/plugins/restapi/v1/lockouts/testuser">http://example.org:9090/plugins/restapi/v1/lockouts/testuser</a></p>
</blockquote>
</blockquote>
<h2 id="retrieve-user-roster-endpoint-to-get-roster-entries-buddies-from-a-specific-user">Retrieve user roster Endpoint to get roster entries (buddies) from a specific user</h2>
<blockquote>
<p><strong>GET</strong> /users/{username}/roster</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Roster</p>
<h3 id="possible-parameters-11">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-12">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/roster">http://example.org:9090/plugins/restapi/v1/users/testuser/roster</a></p>
</blockquote>
</blockquote>
<h2 id="create-a-user-roster-entry-endpoint-to-add-a-new-roster-entry-to-a-user">Create a user roster entry Endpoint to add a new roster entry to a user</h2>
<blockquote>
<p><strong>POST</strong> /users/{username}/roster</p>
</blockquote>
<p><strong>Payload:</strong> RosterItem</p>
<p><strong>Return value:</strong> HTTP status 201 (Created)</p>
<h3 id="possible-parameters-12">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-13">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/roster">http://example.org:9090/plugins/restapi/v1/users/testuser/roster</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong><br>
Payload Example 1 (required parameters):</p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rosterItem</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>jid</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>jid</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rosterItem</span><span class="token punctuation">></span></span>
</code></pre>
<p>Payload Example 2 (available parameters):</p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rosterItem</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>jid</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>jid</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>nickname</span><span class="token punctuation">></span></span>Peter1<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>nickname</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>subscriptionType</span><span class="token punctuation">></span></span>3<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>subscriptionType</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groups</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>group</span><span class="token punctuation">></span></span>Friends<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>group</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groups</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rosterItem</span><span class="token punctuation">></span></span>
</code></pre>
<h2 id="delete-a-user-roster-entry-endpoint-to-remove-a-roster-entry-from-a-user">Delete a user roster entry Endpoint to remove a roster entry from a user</h2>
<blockquote>
<p><strong>DELETE</strong> /users/{username}/roster/{jid}</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-13">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
<tr>
<td>jid</td>
<td>@Path</td>
<td>JID of the roster item</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-14">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>DELETE</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/roster/[email protected]">http://example.org:9090/plugins/restapi/v1/users/testuser/roster/[email protected]</a></p>
</blockquote>
</blockquote>
<h2 id="update-a-user-roster-entry-endpoint-to-update-a-roster-entry">Update a user roster entry Endpoint to update a roster entry</h2>
<blockquote>
<p><strong>PUT</strong> /users/{username}/roster/{jid}</p>
</blockquote>
<p><strong>Payload:</strong> RosterItem</p>
<p><strong>Return value:</strong> HTTP status 200 (OK)</p>
<h3 id="possible-parameters-14">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>username</td>
<td>@Path</td>
<td>Exact username</td>
<td></td>
</tr>
<tr>
<td>jid</td>
<td>@Path</td>
<td>JID of the roster item</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-15">Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>Header:</strong> Content-Type application/xml<br>
<strong>PUT</strong> <a href="http://example.org:9090/plugins/restapi/v1/users/testuser/roster/[email protected]">http://example.org:9090/plugins/restapi/v1/users/testuser/roster/[email protected]</a></p>
</blockquote>
</blockquote>
<p><strong>Payload:</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>rosterItem</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>jid</span><span class="token punctuation">></span></span>[email protected]<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>jid</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>nickname</span><span class="token punctuation">></span></span>Peter Pan<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>nickname</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>subscriptionType</span><span class="token punctuation">></span></span>0<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>subscriptionType</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>groups</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>group</span><span class="token punctuation">></span></span>Support<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>group</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"></</span>groups</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>rosterItem</span><span class="token punctuation">></span></span>
</code></pre>
<h1 id="chat-room-related-rest-endpoints">Chat room related REST Endpoints</h1>
<h2 id="retrieve-all-chat-services">Retrieve all chat services</h2>
<p>Endpoint to get all chat services</p>
<blockquote>
<p><strong>GET</strong> /chatservices</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Chat services</p>
<p><strong>Possible parameters:</strong> none</p>
<h3 id="examples-16">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatservices">http://example.org:9090/plugins/restapi/v1/chatservices</a></p>
</blockquote>
<h2 id="create-a-chat-service">Create a chat service</h2>
<p>Endpoint to create a new chat service.</p>
<blockquote>
<p><strong>POST</strong> /chatservices</p>
</blockquote>
<p><strong>Payload:</strong> Chatservice</p>
<p><strong>Return value:</strong> HTTP status 201 (Created)</p>
<p><strong>Possible parameters:</strong> none</p>
<h3 id="xml-examples-1">XML Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>Header:</strong> Content-Type: application/xml</p>
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatservices">http://example.org:9090/plugins/restapi/v1/chatservices</a></p>
</blockquote>
<p><strong>Payload Example (available parameters):</strong></p>
<pre class=" language-xml"><code class="prism language-xml"><span class="token prolog"><?xml version="1.0" encoding="UTF-8" standalone="yes"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>chatService</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>serviceName</span><span class="token punctuation">></span></span>new-chat-service-name<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>serviceName</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>description</span><span class="token punctuation">></span></span>A mightily fine service<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>description</span><span class="token punctuation">></span></span> <span class="token tag"><span class="token tag"><span class="token punctuation"><</span>hidden</span><span class="token punctuation">></span></span>false<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>hidden</span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation"></</span>chatService</span><span class="token punctuation">></span></span>
</code></pre>
<h3 id="json-examples-1">JSON Examples</h3>
<blockquote>
<p><strong>Header:</strong> Authorization: Basic YWRtaW46MTIzNDU=</p>
<p><strong>Header:</strong> Content-Type: application/json</p>
<p><strong>POST</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatservices">http://example.org:9090/plugins/restapi/v1/chatservices</a></p>
</blockquote>
<p><strong>Payload Example (available parameters):</strong></p>
<pre class=" language-json"><code class="prism language-json"><span class="token punctuation">{</span>
<span class="token string">"serviceName"</span><span class="token punctuation">:</span> <span class="token string">"new-chat-service-name"</span><span class="token punctuation">,</span> <span class="token string">"description"</span><span class="token punctuation">:</span> <span class="token string">"A mightily fine service"</span><span class="token punctuation">,</span> <span class="token string">"hidden"</span><span class="token punctuation">:</span> <span class="token boolean">false</span><span class="token punctuation">}</span>
</code></pre>
<h2 id="retrieve-all-chat-rooms-endpoint-to-get-all-chat-rooms">Retrieve all chat rooms Endpoint to get all chat rooms</h2>
<blockquote>
<p><strong>GET</strong> /chatrooms</p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Chatrooms</p>
<h3 id="possible-parameters-15">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>servicename</td>
<td>@QueryParam</td>
<td>The name of the Group Chat Service</td>
<td>conference</td>
</tr>
<tr>
<td>type</td>
<td>@QueryParam</td>
<td><strong>public:</strong> Only as List Room in Directory set rooms <br> <strong>all:</strong> All rooms.</td>
<td>public</td>
</tr>
<tr>
<td>search</td>
<td>@QueryParam</td>
<td>Search/Filter by room name. <br> This act like the wildcard search %String%</td>
<td></td>
</tr>
</tbody>
</table><h3 id="examples-17">Examples</h3>
<blockquote>
<p><strong>Header</strong>: Authorization: Basic YWRtaW46MTIzNDU=</p>
<blockquote>
<p><strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms">http://example.org:9090/plugins/restapi/v1/chatrooms</a><br>
<strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms?type=all">http://example.org:9090/plugins/restapi/v1/chatrooms?type=all</a><br>
<strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms?type=all&servicename=privateconf">http://example.org:9090/plugins/restapi/v1/chatrooms?type=all&servicename=privateconf</a><br>
<strong>GET</strong> <a href="http://example.org:9090/plugins/restapi/v1/chatrooms?search=test">http://example.org:9090/plugins/restapi/v1/chatrooms?search=test</a></p>
</blockquote>
</blockquote>
<h2 id="retrieve-a-chat-room">Retrieve a chat room</h2>
<p>Endpoint to get information over specific chat room</p>
<blockquote>
<p><strong>GET</strong> /chatrooms<span>/{roomName}</span></p>
</blockquote>
<p><strong>Payload:</strong> none</p>
<p><strong>Return value:</strong> Chatroom</p>
<h3 id="possible-parameters-16">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>servicename</td>
<td>@QueryParam</td>
<td>The name of the Group Chat Service</td>
<td>conference</td>
</tr>
</tbody>