diff --git a/readme.html b/readme.html index f88abe63e..4160e0fe9 100644 --- a/readme.html +++ b/readme.html @@ -46,15 +46,19 @@
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):
+<?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>
+
+ ++Header: Authorization: Basic YWRtaW46MTIzNDU=
+Header: Content-Type: application/json
+POST http://example.org:9090/plugins/restapi/v1/chatservices
+
Payload Example (available parameters):
+{
+ "serviceName": "new-chat-service-name", "description": "A mightily fine service", "hidden": false}
+
GET /chatrooms
@@ -903,7 +949,7 @@Possible parameters
- Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -945,7 +991,7 @@Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -984,7 +1030,7 @@Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1023,7 +1069,7 @@Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1062,7 +1108,8 @@Possible parameters
conference -Create a chat room Endpoint to create a new chat room.
+Create a chat room
+Endpoint to create a new chat room.
@@ -1086,8 +1133,14 @@POST /chatrooms
Possible parameters
The name of the Group Chat Service conference ++ -sendInvitations +@QueryParam +Whether to send invitations to affiliated users +false +XML Examples
+XML Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -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
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -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
+Endpoint to create multiple new chat rooms at once.
+++POST /chatrooms/bulk
+Payload: Chatrooms
+Return value: Result list, ordered by successes and failures
++<?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
+++Header: Authorization: Basic YWRtaW46MTIzNDU=
+Header: Content-Type: application/xml
+POST http://example.org:9090/plugins/restapi/v1/chatrooms/bulk
+Payload Example:
++<?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> +For more examples, with more parameters, see the create a chat room endpoint.
+JSON Examples
+++Header: Authorization: Basic YWRtaW46MTIzNDU=
+Header: Content-Type: application/json
+ +Payload Example 1 (required parameters):
++{ + "chatRooms": [ { "roomName": "room1", "description": "description1" }, { "roomName": "room2", "description": "description2" } ]} +For more examples, with more parameters, see the create a chat room endpoint.
Delete a chat room Endpoint to delete a chat room.
DELETE /chatrooms/{roomName}
Payload: none
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1156,7 +1271,7 @@
Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1170,7 +1285,7 @@Update a chat room E
Payload: Chatroom
Return value: HTTP status 200 (OK)
-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
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -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
-Endpoint to invite a user to a room.
+Invite user or user group to a chat Room
+Endpoint to invite a user or a user group to a room.
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1223,7 +1344,7 @@Invite user to a chat Room
<reason>Hello, come to this room, it is nice</reason></mucInvitation>Return value: HTTP status 200 (OK)
-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
+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:
++<?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> +Return value: HTTP status 200 (OK)
+Possible parameters
+ ++ +
+ + + +Parameter +Parameter Type +Description +Default value ++ @@ -1255,7 +1408,7 @@roomname +@Path +Exact room name Possible parameters
Payload: none
Return value: HTTP status 200 (OK)
-Possible parameters
+Possible parameters
@@ -1286,7 +1439,7 @@
Possible parameters
conference -Examples
+Examples
Header: Authorization: Basic YWRtaW46MTIzNDU=
Header: Content-Type application/xml
@@ -1304,7 +1457,7 @@Add user with affiliation to cha
Payload: none
Return value: HTTP status 201 (Created)
-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
Header: Authorization: Basic YWRtaW46MTIzNDU=
@@ -1349,7 +1508,7 @@@@ -1361,7 +1520,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=privateconfReplace all users w
Payload: list of affiliations
Return value: HTTP status 201 (Created)
-Possible parameters
+Possible parameters
@@ -1391,8 +1550,14 @@
Possible parameters
The name of the Group Chat Service conference ++ -sendInvitations +@QueryParam +Whether to send invitation to newly affiliated users +false +Examples
+Examples
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)
-Possible parameters
+Possible parameters
@@ -1440,8 +1605,14 @@
Possible parameters
The name of the Group Chat Service conference ++ -sendInvitations +@QueryParam +Whether to send invitations to newly affiliated users +false +Examples
+Examples
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)
-Possible parameters
+Possible parameters
@@ -1495,8 +1666,14 @@
Possible parameters
The name of the Group Chat Service conference ++ -sendInvitations +@QueryParam +Whether to send invitations to the users in the newly affiliated groups +false +Examples
+Examples
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