Wiki source code of Chat Configuration

Last modified by michaely on 2021/09/10 23:34

Show last authors
1 {{layout}}
2 {{layout-section ac:type="two_right_sidebar"}}
3 {{layout-cell}}
4 {{warning}}
5 This page is currently being written. Although the information below is probably accurate, it may not be complete or may have errors.
6 {{/warning}}
7
8 {{info}}
9 The information on this page applies to **iSymphony 3.1+**.
10 {{/info}}
11
12 = (% style="color: rgb(0,0,0);" %)Description(%%) =
13
14 The chat REST resource allows access to the core chat module configuration. This resource can be used to specify the chat driver to utilize for a specific core server.
15
16
17 {{/layout-cell}}
18
19 {{layout-cell}}
20 {{panel title="On this page:"}}
21
22
23 {{toc maxLevel="2" indent="1"/}}
24 {{/panel}}
25 {{/layout-cell}}
26 {{/layout-section}}
27
28 {{layout-section ac:type="single"}}
29 {{layout-cell}}
30 = (% style="color: rgb(0,0,0);" %)Root Resource Path(%%) =
31
32 {{code}}
33 communication_manager/api/resource/chat
34 {{/code}}
35
36 = JSON Representation =
37
38 {{code}}
39 {
40 "selectedChatDriverId": "com.xmlnamespace.panel.server.core.chat.driver.defaultdriver.DefaultChatDriver"
41 }
42 {{/code}}
43
44 |=(((
45 Property
46 )))|=(((
47 Type
48 )))|=(((
49 Description
50 )))
51 |(((
52 {{{selectedChatDriverId}}}
53 )))|(((
54 String
55 )))|(((
56 The id of the chat driver to utilize for chat functionality.
57
58 **Values:**
59
60 * //com.xmlnamespace.panel.server.core.chat.driver.defaultdriver.DefaultChatDriver//
61 Default, built in chat driver.
62 \\
63 * //com.xmlnamespace.panel.server.core.chat.xmpp.driver.XMPPChatDriver//
64 Chat driver that is backed by an external XMPP server.
65 )))
66
67 = Resource Paths =
68
69 |=(% colspan="2" %)(% colspan="2" %)
70 (((
71 {{{communication_manager/api/resource/chat}}}
72 )))
73 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
74 (((
75 **Description**
76 )))|(((
77 Accesses the chat configuration models for all core servers in the system.
78 )))
79 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
80 (((
81 **GET**
82 )))|(((
83 Gets all the chat configuration models for all core servers in the system.
84 )))
85 |(% colspan="2" %)(% colspan="2" %)
86 (((
87
88 )))
89 |=(% colspan="2" %)(% colspan="2" %)
90 (((
91 {{{communication_manager/api/resource/chat/{core_server_id}}}}
92 )))
93 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
94 (((
95 **Description**
96 )))|(((
97 Accesses the chat configuration model for the specified core server.
98
99 **Parameters:**
100
101 * core_server_id: The UUID of the core server.
102
103 **Errors:**
104
105 * 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
106 * 412 'No selectedChatDriverId provided.': Returned if no selected chat driver was provided during a PUT.
107 )))
108 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
109 (((
110 **GET**
111 )))|(((
112 Gets the chat configuration model for the specified core server.
113 )))
114 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
115 (((
116 **PUT**
117 )))|(((
118 Updates the chat configuration model for the specified core server.
119 )))
120 |(% colspan="2" %)(% colspan="2" %)
121 (((
122
123 )))
124 |=(% colspan="2" %)(% colspan="2" %)
125 (((
126 {{{communication_manager/api/resource/chat/getBySlug/{core_server_slug}}}}
127 )))
128 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
129 (((
130 **Description**
131 )))|(((
132 Accesses the chat configuration model for the specified core server via the core server slug/unique id
133
134 **Parameters:**
135
136 * core_server_slug: The slug/unique id of the core server.
137
138 **Errors:**
139
140 * 404 'Failed to locate the core server with the given id.': Returned if no core server exists with the given id.
141 * 412 'No selectedChatDriverId provided.': Returned if no selected chat driver was provided during a PUT.
142 )))
143 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
144 (((
145 **GET**
146 )))|(((
147 Gets the chat configuration model for the specified core server.
148 )))
149 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
150 (((
151 **PUT**
152 )))|(((
153 Updates the chat configuration model for the specified core server.
154 )))
155
156 = Curl Examples =
157
158 === Get chat configuration for the 'default' core server ===
159
160 {{code language="bash"}}
161 curl --user manager:manag3rpa55word -k -i -H "Accept: application/json" http://localhost:58080/communication_manager/api/resource/chat/getBySlug/default
162 {{/code}}
163
164 === Update the 'default' core server, to utilize the XMPP chat driver ===
165
166 {{code language="bash"}}
167 curl --user manager:manag3rpa55word -k -i -H "Content-Type: application/json" -X PUT -d '{"selectedChatDriverId": "com.xmlnamespace.panel.server.core.chat.xmpp.driver.XMPPChatDriver"}' http://localhost:58080/communication_manager/api/resource/chat/getBySlug/default
168 {{/code}}
169 {{/layout-cell}}
170 {{/layout-section}}
171 {{/layout}}
iSymphony