From 2b57c803e40f8c1f8fc2f0a05637cfe2389c1892 Mon Sep 17 00:00:00 2001
From: Guus der Kinderen Endpoint to get all chat services GET /chatservices Payload: none Return value: Chat services Possible parameters: none Header: Authorization: Basic YWRtaW46MTIzNDU= Endpoint to create a new chat service. POST /chatservices Payload: Chatservice Return value: HTTP status 201 (Created) Possible parameters: none Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type: application/xml POST http://example.org:9090/plugins/restapi/v1/chatservices Payload Example (available parameters): Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type: application/json POST http://example.org:9090/plugins/restapi/v1/chatservices Payload Example (available parameters): GET /chatrooms Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Authorization: Basic YWRtaW46MTIzNDU= Endpoint to create a new chat room. POST /chatrooms Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Authorization: Basic YWRtaW46MTIzNDU= Endpoint to create multiple new chat rooms at once. POST /chatrooms/bulk Payload: Chatrooms Return value: Result list, ordered by successes and failures Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type: application/xml POST http://example.org:9090/plugins/restapi/v1/chatrooms/bulk Payload Example: For more examples, with more parameters, see the create a chat room endpoint. Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type: application/json Payload Example 1 (required parameters): For more examples, with more parameters, see the create a chat room endpoint. DELETE /chatrooms/{roomName} Payload: none Return value: HTTP status 200 (OK) Header: Authorization: Basic YWRtaW46MTIzNDU= Payload: Chatroom Return value: HTTP status 200 (OK) Header: Authorization: Basic YWRtaW46MTIzNDU= Endpoint to invite a user to a room. Endpoint to invite a user or a user group to a room. Header: Authorization: Basic YWRtaW46MTIzNDU= Return value: HTTP status 200 (OK) Endpoint to invite multiple users and/or user groups to a room. Works both with JIDs and (user/group) names. Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type: application/xml POST http://localhost:9090/plugins/restapi/v1/chatrooms/{roomName}/invite Payload Example: Return value: HTTP status 200 (OK) Payload: none Return value: HTTP status 200 (OK) Header: Authorization: Basic YWRtaW46MTIzNDU= Header: Content-Type application/xml Payload: none Return value: HTTP status 201 (Created) Header: Authorization: Basic YWRtaW46MTIzNDU=
+
Possible parameters
<jid>peter@pan.de</jid> <nickname>Peter Pan</nickname> <subscriptionType>0</subscriptionType> <groups> <group>Support</group> </groups></rosterItem>
Chat room related REST Endpoints
+ Retrieve all chat services
+
+
+ Examples
+
+
+ Create a chat service
+
+
+ XML Examples
+
+
+
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<chatService>
+ <serviceName>new-chat-service-name</serviceName> <description>A mightily fine service</description> <hidden>false</hidden></chatService>
+JSON Examples
+
+
+ {
+ "serviceName": "new-chat-service-name", "description": "A mightily fine service", "hidden": false}
+Retrieve all chat rooms Endpoint to get all chat rooms
Possible parameters
- Examples
+ Examples
@@ -945,7 +991,7 @@
Possible parameters
conference
- Examples
+ Examples
@@ -984,7 +1030,7 @@
Possible parameters
conference
- Examples
+ Examples
@@ -1023,7 +1069,7 @@
Possible parameters
conference
- Examples
+ Examples
@@ -1062,7 +1108,8 @@
Possible parameters
conference
- Create a chat room Endpoint to create a new chat room.
+ Create a chat room
+
@@ -1086,8 +1133,14 @@ Possible parameters
The name of the Group Chat Service
conference
+
+
- sendInvitations
+ @QueryParam
+ Whether to send invitations to affiliated users
+ false
+ XML Examples
+ XML Examples
@@ -1105,7 +1158,7 @@
Possible parameters
<chatRoom>
<roomName>global</roomName> <naturalName>global-2</naturalName> <description>Global Chat Room</description> <subject>global-2 Subject</subject> <creationDate>2014-02-12T15:52:37.592+01:00</creationDate> <modificationDate>2014-09-12T15:35:54.702+02:00</modificationDate> <maxUsers>0</maxUsers> <persistent>true</persistent> <publicRoom>true</publicRoom> <registrationEnabled>false</registrationEnabled> <canAnyoneDiscoverJID>false</canAnyoneDiscoverJID> <canOccupantsChangeSubject>false</canOccupantsChangeSubject> <canOccupantsInvite>false</canOccupantsInvite> <canChangeNickname>false</canChangeNickname> <logEnabled>true</logEnabled> <loginRestrictedToNickname>false</loginRestrictedToNickname> <membersOnly>false</membersOnly> <moderated>false</moderated> <allowPM>anyone</allowPM> <broadcastPresenceRoles> <broadcastPresenceRole>moderator</broadcastPresenceRole> <broadcastPresenceRole>participant</broadcastPresenceRole> <broadcastPresenceRole>visitor</broadcastPresenceRole> </broadcastPresenceRoles> <owners> <owner>owner@localhost</owner> </owners> <admins> <admin>admin@localhost</admin> </admins> <members> <member>member2@localhost</member> <member>member1@localhost</member> </members> <outcasts> <outcast>outcast1@localhost</outcast> </outcasts></chatRoom>
- JSON Examples
+ JSON Examples
@@ -1125,13 +1178,75 @@
JSON Examples
+ {
"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", "allowPM": "anyone", "broadcastPresenceRoles": [ "moderator", "participant", "visitor" ], "owners": [ "owner@localhost" ], "admins": [ "admin@localhost" ], "members": [ "member@localhost" ], "outcasts": [ "outcast@localhost" ]}
Create multiple chat room
+
+
+
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<results>
+ <success> <result> <roomName>room1</roomName> <resultType>Success</resultType> <message>Room was successfully created</message> </result> <result> <roomName>room2</roomName> <resultType>Success</resultType> <message>Room was successfully created</message> </result> </success> <failure/> <other/></results>
+
+ {
+ "success": [ { "roomName": "room1", "resultType": "Success", "message": "Room was successfully created" }, { "roomName": "room2", "resultType": "Success", "message": "Room was successfully created" } ], "failure": [], "other": []}
+Possible parameters
+
+
+
+
+
+
+
+ Parameter
+ Parameter Type
+ Description
+ Default value
+
+
+ servicename
+ @QueryParam
+ The name of the Group Chat Service
+ conference
+
+
+
+ sendInvitations
+ @QueryParam
+ Whether to send invitations to newly affiliated users
+ false
+ XML Examples
+
+
+
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<chatRooms>
+ <chatRoom> <roomName>room1</roomName> <description>description1</description> </chatRoom> <chatRoom> <roomName>room2</roomName> <description>description1</description> </chatRoom></chatRooms>
+JSON Examples
+
+
+
+ {
+ "chatRooms": [ { "roomName": "room1", "description": "description1" }, { "roomName": "room2", "description": "description2" } ]}
+Delete a chat room Endpoint to delete a chat room.
Possible parameters
+ Possible parameters
@@ -1156,7 +1271,7 @@
Possible parameters
conference
- Examples
+ Examples
@@ -1170,7 +1285,7 @@
Update a chat room E
Possible parameters
+ Possible parameters
@@ -1194,8 +1309,14 @@
Possible parameters
The name of the Group Chat Service
conference
+
+
- sendInvitations
+ @QueryParam
+ Whether to send invitations to newly affiliated users
+ false
+ Examples
+ Examples
@@ -1208,8 +1329,8 @@
Possible parameters
<chatRoom>
<roomName>global</roomName> <naturalName>global-2</naturalName> <description>Global Chat Room edit</description> <subject>New subject</subject> <password>test</password> <creationDate>2014-02-12T15:52:37.592+01:00</creationDate> <modificationDate>2014-09-12T14:20:56.286+02:00</modificationDate> <maxUsers>0</maxUsers> <persistent>true</persistent> <publicRoom>true</publicRoom> <registrationEnabled>false</registrationEnabled> <canAnyoneDiscoverJID>false</canAnyoneDiscoverJID> <canOccupantsChangeSubject>false</canOccupantsChangeSubject> <canOccupantsInvite>false</canOccupantsInvite> <canChangeNickname>false</canChangeNickname> <logEnabled>true</logEnabled> <loginRestrictedToNickname>false</loginRestrictedToNickname> <membersOnly>false</membersOnly> <moderated>false</moderated> <allowPM>anyone</allowPM> <broadcastPresenceRoles/> <owners> <owner>owner@localhost</owner> </owners> <admins> <admin>admin@localhost</admin> </admins> <members> <member>member2@localhost</member> <member>member1@localhost</member> </members> <outcasts> <outcast>outcast1@localhost</outcast> </outcasts></chatRoom>
- Invite user to a chat Room
- Invite user or user group to a chat Room
+
@@ -1223,7 +1344,7 @@
Invite user to a chat Room
<reason>Hello, come to this room, it is nice</reason></mucInvitation>
Possible parameters
+ Possible parameters
@@ -1244,7 +1365,39 @@
Possible parameters
+
+ name
@Path
- The local username or the user JID
+ The local username or group name or the user JID or group JID
+
+ Invite multiple users and/or user groups to a chat Room
+
+
+
+ <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<mucInvitation>
+ <reason>Hello, come to this room, it is nice</reason> <jidsToInvite> <jid>jane@example.org</jid> <jid>ADNMQP8=@example.org/695c6ae413c00446733d926ccadefd8b</jid> <jid>john</jid> <jid>SomeGroupName</jid> </jidsToInvite></mucInvitation>
+Possible parameters
+
+
+
+
+
+
+
+ Parameter
+ Parameter Type
+ Description
+ Default value
+
+
@@ -1255,7 +1408,7 @@ roomname
+ @Path
+ Exact room name
Possible parameters
Possible parameters
+ Possible parameters
@@ -1286,7 +1439,7 @@
Possible parameters
conference
- Examples
+ Examples
Add user with affiliation to cha
Possible parameters
+ Possible parameters
@@ -1340,8 +1493,14 @@
Possible parameters
The name of the Group Chat Service
conference
+
+
- sendInvitations
+ @QueryParam
+ Whether to send invitation to the newly affiliated user
+ false
+ Examples
+ Examples
@@ -1349,7 +1508,7 @@
Possible parameters
POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/testUser
POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/testUser@openfire.com
POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/admins/testUser
- POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/members/testUser
+ POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/members/testUser?sendInvitations=true
POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/outcasts/testUser
POST http://example.org:9090/plugins/restapi/v1/chatrooms/global/owners/testUser?servicename=privateconf
Payload: list of affiliations
Return value: HTTP status 201 (Created)
-| The name of the Group Chat Service | conference | +||
| sendInvitations | +@QueryParam | +Whether to send invitation to newly affiliated users | +false | +
Header: Authorization: Basic YWRtaW46MTIzNDU=
Header: Content-Type application/xml
@@ -1410,7 +1575,7 @@Add multiple users
Payload: list of affiliations
Return value: HTTP status 201 (Created)
-| The name of the Group Chat Service | conference | +||
| sendInvitations | +@QueryParam | +Whether to send invitations to newly affiliated users | +false | +
Header: Authorization: Basic YWRtaW46MTIzNDU=
Header: Content-Type application/xml
@@ -1459,7 +1630,7 @@Add group with affiliation to c
Payload: none
Return value: HTTP status 201 (Created)
-| The name of the Group Chat Service | conference | +||
| sendInvitations | +@QueryParam | +Whether to send invitations to the users in the newly affiliated groups | +false | +
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1516,7 +1693,7 @@Possible parameters +
Possible parameters
@@ -1553,7 +1730,7 @@
Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1573,7 +1750,7 @@Re
Payload: none
Return value: System properties
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1586,7 +1763,7 @@Possible parameters +
Possible parameters
@@ -1605,7 +1782,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/system/properties/xmpp.domain
@@ -1616,7 +1793,7 @@Create a
Payload: System Property
Return value: HTTP status 201 (Created)
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1635,7 +1812,7 @@Delete a system property
Payload: none
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1654,7 +1831,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1668,7 +1845,7 @@Update a system property
Payload: System property
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1687,7 +1864,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1706,7 +1883,7 @@Retrieve concurrent sessions
Payload: none
Return value: Sessions count
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/system/statistics/sessions
@@ -1767,7 +1944,7 @@Perform ‘connections’ readiness
Payload: none
Return value: HTTP status 200 (OK). Any HTTP status outside the range 200-399 indicates failure.
-Possible parameters
+Possible parameters
@@ -1799,7 +1976,7 @@
Retrieve all groups Endp
Payload: none
Return value: Groups
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1812,7 +1989,7 @@Retrie
Payload: none
Return value: Group
-Possible parameters
+Possible parameters
@@ -1831,7 +2008,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/groups/moderators
@@ -1842,7 +2019,7 @@Create a group Endpoint t
Payload: Group
Return value: HTTP status 201 (Created)
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1862,7 +2039,7 @@Delete a group
Payload: none
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1881,7 +2058,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1895,7 +2072,7 @@Update a group
Payload: Group
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1914,7 +2091,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1935,7 +2112,7 @@Retrieve all user session
Payload: none
Return value: Sessions
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1949,7 +2126,7 @@Retrieve the user sessions
Payload: none
Return value: Sessions
-Possible parameters
+Possible parameters
@@ -1968,7 +2145,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/sessions/testuser
@@ -1980,7 +2157,7 @@Close all user sessions
Payload: none
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1999,7 +2176,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
DELETE http://example.org:9090/plugins/restapi/v1/sessions/testuser
@@ -2012,7 +2189,7 @@Send a broadcast message
Payload: Message
Return value: HTTP status 201 (Created)
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -2032,7 +2209,7 @@Retrieve the Security audit logs
Payload: none
Return value: Security Audit Logs
-Possible parameters
+Possible parameters
@@ -2075,7 +2252,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -2091,7 +2268,7 @@Retrieve information for al
Payload: none
Return value: ClusterNodes
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/clustering/nodes
@@ -2104,7 +2281,7 @@Retrieve information
Payload: none
Return value: ClusterNode
-Possible parameters
+Possible parameters
@@ -2123,7 +2300,7 @@
Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/clustering/nodes/52a89928-66f7-45fd-9bb8-096de07400ac
@@ -2135,7 +2312,7 @@Retrieve the Clustering status
Payload: none
Return value: String describing the clustering status of this Openfire instance
-Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
GET http://example.org:9090/plugins/restapi/v1/clustering/status