Wiki source code of Agents

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.2+**.
10 {{/info}}
11
12 {{note}}
13 This resource is restricted by licensing. See the resource and action path information below for more details.
14 {{/note}}
15
16 = (% style="color: rgb(0,0,0);" %)Description(%%) =
17
18 The live agent REST resource provides access to information about agents that are members of queues in the system. This resource also provides actions to log agents out of queues, pause/unpause agents, and set the penalty value of agents.
19 {{/layout-cell}}
20
21 {{layout-cell}}
22 {{panel title="On this page:"}}
23
24
25 {{toc maxLevel="2" indent="1"/}}
26 {{/panel}}
27 {{/layout-cell}}
28 {{/layout-section}}
29
30 {{layout-section ac:type="single"}}
31 {{layout-cell}}
32 (% style="color: rgb(0,0,0);" %)
33
34
35 = (% style="color: rgb(0,0,0);" %)JSON Representation(%%) =
36
37 {{code}}
38 {
39 "id": "20304714-df17-43c7-a569-d322724f17fd",
40 "paused": false,
41 "state": "NOT_INUSE",
42 "name": "Michael Y",
43 "dynamic": true
44 }
45 {{/code}}
46
47 (% style="line-height: 1.4285715;" %)
48 |=(((
49 Property
50 )))|=(((
51 Type
52 )))|=(((
53 Description
54 )))
55 |(((
56 {{{id}}}
57 )))|(((
58 String
59 )))|(((
60 The id of the agent.
61 )))
62 |(% colspan="1" %)(% colspan="1" %)
63 (((
64 paused
65 )))|(% colspan="1" %)(% colspan="1" %)
66 (((
67 Boolean
68 )))|(% colspan="1" %)(% colspan="1" %)
69 (((
70 Specifies if the agent is paused.
71 )))
72 |(% colspan="1" %)(% colspan="1" %)
73 (((
74 state
75 )))|(% colspan="1" %)(% colspan="1" %)
76 (((
77 String
78 )))|(% colspan="1" %)(% colspan="1" %)
79 (((
80 The state of the agent.
81 )))
82 |(% colspan="1" %)(% colspan="1" %)
83 (((
84 name
85 )))|(% colspan="1" %)(% colspan="1" %)
86 (((
87 String
88 )))|(% colspan="1" %)(% colspan="1" %)
89 (((
90 The display name of the agent.
91 )))
92 |(% colspan="1" %)(% colspan="1" %)
93 (((
94 {{{dynamic}}}
95 )))|(% colspan="1" %)(% colspan="1" %)
96 (((
97 Boolean
98 )))|(% colspan="1" %)(% colspan="1" %)
99 (((
100 Specifies if the agent login is dynamic or not.
101 )))
102
103 = Root Resource Paths =
104
105 Paths used to access sets of the resource, in relation to parent resources.
106
107 |=(% colspan="2" %)(% colspan="2" %)
108 (((
109 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/queues/[{queue_id} | getByName/{queue_identifier}]/agents}}}
110 )))
111 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
112 (((
113 **Description**
114 )))|(((
115 Provides access to all agents that are currently logged into the specified queue.
116
117 {{info}}
118 This resource will not be available if the queue is not enabled.
119
120 Excludes any agents that are not related to extensions that are bound to a licensed/full user.
121 {{/info}}
122
123 **Parameters:**
124
125 * core_server_id: the id of the parent core server\\
126 * core_server_slug: the slug of the parent core server
127 * queue_id: the id of the parent queue
128 * queue_identifier: the identifier of the parent queue
129
130 **Errors:**
131
132 * 404 Not Found: Returned if no core server with the given id or slug exists
133 * 404 Not Found: Returned if no queue with the given id or identifier exists
134 * 403 Forbidden: Returned if the specified queue is not enabled
135 )))
136 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
137 (((
138 **GET**
139 )))|(% colspan="1" %)(% colspan="1" %)
140 (((
141 Gets all agents logged into a specified queue.
142 )))
143 |(% colspan="2" %)(% colspan="2" %)
144 (((
145
146 )))
147 |=(% colspan="2" %)(% colspan="2" %)
148 (((
149 {{{communication_manager/rest/live/coreServers/[{core_server_id} | getByName/{core_server_slug}]/extensions/[{extensions_id} | getByName/{extension_number}]/agents}}}
150 )))
151 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
152 (((
153 **Description**
154 )))|(% colspan="1" %)(% colspan="1" %)
155 (((
156 Provides access to all agents the specified extension relates to, across all queues.
157
158 {{info}}
159 This resource will not be available if the extension is not bound to a licensed/full user.
160
161 Excludes any agents that are logged into to queues that are not enabled.
162 {{/info}}
163
164 **Parameters:**
165
166 * core_server_id: the id of the parent core server\\
167 * core_server_slug: the slug of the parent core server
168 * extension_id: the id of the parent extension
169 * (% style="font-family: monospace;" %)extension_number(%%): the extension number of the parent extension
170
171 **Errors:**
172
173 * 404 Not Found: Returned if no core server with the given id or slug exists
174 * 404 Not Found: Returned if no extension with the given id or number exists
175 * 403 Forbidden: Returned if the specified extension is not bound to a licensed/full user.
176 )))
177 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
178 (((
179 **GET**
180 )))|(% colspan="1" %)(% colspan="1" %)
181 (((
182 Gets all the agents the specified extension relates to, across all queues.
183 )))
184
185 = Instance Resource Paths =
186
187 Paths used to access a specific instance of the resource.
188
189 |=(% colspan="2" %)(% colspan="2" %)
190 (((
191 {{{{root_resource_path}/{agent_id}}}}
192 )))
193 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
194 (((
195 **Description**
196 )))|(% colspan="1" %)(% colspan="1" %)
197 (((
198 Provides access to a specific agent, by agent id.
199
200 {{info}}
201 This resource will not be available if the queue is not enabled.
202
203 This resource will not be available if the extension is not bound to a licensed/full user.
204 {{/info}}
205
206 **Parameters:**
207
208 * root_resource_path: One of the root resource paths for this resource. See Root Resource Paths above
209 * agent_id: the id of the agent to access
210
211 **Errors:**
212
213 * 404 Not Found: Returned if any of the ancestors in the root resource path could not be found
214 * 404 Not Found: Returned if no agent with the specified agent id could be found
215 * 403 Forbidden: Returned if the specified queue is not enabled
216 * 403 Forbidden: Returned if the specified extension is not bound to a licensed/full user.
217 )))
218 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
219 (((
220 **GET**
221 )))|(% colspan="1" %)(% colspan="1" %)
222 (((
223 Gets the specified agent.
224 )))
225
226 = Sub Resource Paths =
227
228 Paths used to access the child resources of this resource.
229
230 |=(% colspan="2" %)(% colspan="2" %)
231 (((
232 {{{{instance_resource_path}/extension}}}
233 )))
234 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
235 (((
236 **Description**
237 )))|(% colspan="1" %)(% colspan="1" %)
238 (((
239 Provides access to the extension the specified agent is related to. See [[doc:Extensions]].
240
241 {{info}}
242 This resource will not be available if agent's extension is not bound to licensed/full user, or the queue the agent is in is not enabled.
243 {{/info}}
244
245 **Parameters:**
246
247 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
248
249 **Errors:**
250
251 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
252 * 403 Forbidden: Returned if any of the parents specified in the root resource path are restricted
253 )))
254 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
255 (((
256 **GET**
257 )))|(% colspan="1" %)(% colspan="1" %)
258 (((
259 Gets all the extension the agent is related to.
260 )))
261 |(% colspan="1" %)(% colspan="1" %)
262 (((
263
264 )))|(% colspan="1" %)(% colspan="1" %)
265 (((
266
267 )))
268 |=(% colspan="2" %)(% colspan="2" %)
269 (((
270 {{{{instance_resource_path}/statistics}}}
271 )))
272 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
273 (((
274 **Description**
275 )))|(% colspan="1" %)(% colspan="1" %)
276 (((
277 Provides access to the statistics of the specified agent. See [[doc:Statistics]].
278
279 {{info}}
280 This resource will not be available if agent's extension is not bound to licensed/full user, or the queue the agent is in is not enabled.
281 {{/info}}
282
283 **Parameters:**
284
285 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
286
287 **Errors:**
288
289 *
290 ** 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
291 ** 403 Forbidden: Returned if any of the parents specified in the root resource path are restricted
292 )))
293 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
294 (((
295 **GET**
296 )))|(% colspan="1" %)(% colspan="1" %)
297 (((
298 Gets the statistics of the specified agent.
299 )))
300
301 = Action Paths =
302
303 Actions that can be performed on this resource.
304
305 |=(% colspan="2" %)(% colspan="2" %)
306 (((
307 {{{{instance_resource_path}/logout}}}
308 )))
309 |(% class="highlight-grey" data-highlight-colour="grey" %)(% class="highlight-grey" data-highlight-colour="grey" %)
310 (((
311 **Description**
312 )))|(((
313 Logs the specified agent out of its queue.
314
315 {{info}}
316 This action will not be available if the queue is not enabled.
317
318 This action will not be available if the agent's extension is not bound to a licensed/full user.
319 {{/info}}
320
321 **Parameters:**
322
323 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
324
325 **Errors:**
326
327 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
328 * 403 Forbidden: Returned if the queue is not enabled
329 * 403 Forbidden: Returned if if the agent's extension is not bound to a licensed/full user
330 )))
331 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
332 (((
333 **POST
334 **
335 )))|(% colspan="1" %)(% colspan="1" %)
336 (((
337 Logs the specified agent out of its queue.
338 )))
339 |(% colspan="2" %)(% colspan="2" %)
340 (((
341
342 )))
343 |=(% colspan="2" %)(% colspan="2" %)
344 (((
345 {{{{instance_resource_path}/pause}}}
346 )))
347 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
348 (((
349 **Description**
350 )))|(% colspan="1" %)(% colspan="1" %)
351 (((
352 Pauses the specified agent.
353
354 {{info}}
355 This action will not be available if the queue is not enabled.
356
357 This action will not be available if the agent's extension is not bound to a licensed/full user.
358 {{/info}}
359
360 **Parameters:**
361
362 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
363
364 **Errors:**
365
366 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
367 * 403 Forbidden: Returned if the queue is not enabled
368 * 403 Forbidden: Returned if if the agent's extension is not bound to a licensed/full user
369 )))
370 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
371 (((
372 **POST**
373 )))|(% colspan="1" %)(% colspan="1" %)
374 (((
375 Pauses the specified agent.
376 )))
377 |(% colspan="2" %)(% colspan="2" %)
378 (((
379
380 )))
381 |=(% colspan="2" %)(% colspan="2" %)
382 (((
383 {{{{instance_resource_path}/unpause}}}
384 )))
385 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
386 (((
387 **Description**
388 )))|(% colspan="1" %)(% colspan="1" %)
389 (((
390 Unpauses the specified agent.
391
392 {{info}}
393 This action will not be available if the queue is not enabled.
394
395 This action will not be available if the agent's extension is not bound to a licensed/full user.
396 {{/info}}
397
398 **Parameters:**
399
400 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
401
402 **Errors:**
403
404 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
405 * 403 Forbidden: Returned if the queue is not enabled
406 * 403 Forbidden: Returned if if the agent's extension is not bound to a licensed/full user
407 )))
408 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
409 (((
410 **POST**
411 )))|(% colspan="1" %)(% colspan="1" %)
412 (((
413 Unpauses the specified agent.
414 )))
415 |(% colspan="2" %)(% colspan="2" %)
416 (((
417
418 )))
419 |=(% colspan="2" %)(% colspan="2" %)
420 (((
421 {{{{instance_resource_path}/setPenalty}}}
422 )))
423 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
424 (((
425 **Description**
426 )))|(% colspan="1" %)(% colspan="1" %)
427 (((
428 Sets the penalty value of the specified agent.
429
430 {{info}}
431 This action will not be available if the queue is not enabled.
432
433 This action will not be available if the agent's extension is not bound to a licensed/full user.
434 {{/info}}
435
436 **Parameters:**
437
438 * instance_resource_path: One of the instance resource paths for this resource. See Instance Resource Paths above
439
440 **Errors:**
441
442 * 404 Not Found: Returned if any of the ancestors in the instance resource path could not be found
443 * 403 Forbidden: Returned if the queue is not enabled
444 * 403 Forbidden: Returned if if the agent's extension is not bound to a licensed/full user
445 * 422 Unprocessable Entity: Returned if no penalty value was provided
446 * 422 Unprocessable Entity: Returned if the penalty value that was provided is not an integer
447 )))
448 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
449 (((
450 **JSON**
451 )))|(% colspan="1" %)(% colspan="1" %)
452 (((
453 {{code}}
454 {
455 "penalty": 5
456 }
457 {{/code}}
458
459 **Properties:**
460
461 |=(((
462 Property
463 )))|=(((
464 Type
465 )))|=(((
466 Description
467 )))
468 |(% colspan="1" %)(% colspan="1" %)
469 (((
470 {{{penalty}}}
471 )))|(% colspan="1" %)(% colspan="1" %)
472 (((
473 Integer
474 )))|(% colspan="1" %)(% colspan="1" %)
475 (((
476 The new penalty value for the agent.
477 )))
478 )))
479 |(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)(% class="highlight-grey" colspan="1" data-highlight-colour="grey" %)
480 (((
481 **POST**
482 )))|(% colspan="1" %)(% colspan="1" %)
483 (((
484 Sets the penalty value of the specified agent.
485 )))
486
487 = Curl Examples =
488
489 === Get all agents logged into a queue ===
490
491 {{code language="bash"}}
492 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents
493 {{/code}}
494
495 === Get a specific agent logged into a queue ===
496
497 {{code language="bash"}}
498 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents/20304714-df17-43c7-a569-d322724f17fd
499 {{/code}}
500
501 === (% style="color: rgb(0,0,0);" %)Get all agents related to an extension(%%) ===
502
503 {{code language="bash"}}
504 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/extensions/ef2faba9-8557-49c1-9ffc-5a71f41c7a23/agents
505 {{/code}}
506
507 === (% style="color: rgb(0,0,0);" %)Get a specific agent related to an extension(%%) ===
508
509 {{code language="bash"}}
510 curl --user manager:manag3rpa55word -i -H "Accept: application/json" http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/extensions/ef2faba9-8557-49c1-9ffc-5a71f41c7a23/agents/20304714-df17-43c7-a569-d322724f17fd
511 {{/code}}
512
513 === Log an agent out of its queue ===
514
515 {{code language="bash"}}
516 curl --user manager:manag3rpa55word -i -X POST http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents/20304714-df17-43c7-a569-d322724f17fd/logout
517 {{/code}}
518
519 === Pause an agent ===
520
521 {{code language="bash"}}
522 curl --user manager:manag3rpa55word -i -X POST http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents/20304714-df17-43c7-a569-d322724f17fd/pause
523 {{/code}}
524
525 === UnPause an agent ===
526
527 {{code language="bash"}}
528 curl --user manager:manag3rpa55word -i -X POST http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents/20304714-df17-43c7-a569-d322724f17fd/unpause
529 {{/code}}
530
531 === Set the penalty on an agent ===
532
533 {{code language="bash"}}
534 curl --user manager:manag3rpa55word -i -H "Content-Type: application/json" -X POST -d '{"penalty": "5"}' http://localhost:58080/communication_manager/rest/live/coreServers/ca5de6c4-17bd-46ce-95a2-8b29c7812ca4/queues7a2eeb64-24e1-418f-97fd-28880ba6539e/agents/20304714-df17-43c7-a569-d322724f17fd/setPenalty
535 {{/code}}
536 {{/layout-cell}}
537 {{/layout-section}}
538 {{/layout}}
iSymphony