A full list of the Dialog APIs, with details, can be found at
https://developer.cisco.com/docs/finesse/#dialog-apis.
The Python script in Example 10-12 shows how to make
an API call to make a call between extension 6001 and
extension 6002.
Example 10-12 Python Request to Initiate a Dialog
Between Two Numbers
Click here to view code image
""" Finesse - Initiate a dialog between two
numbers """
import requests
URL = "http://hq-
uccx.abc.inc:8082/finesse/api/User/Agent001/Dialogs"
PAYLOAD = (
"<Dialog>" +
"
<requestedAction>MAKE_CALL</requestedAction>" +
" <fromAddress>6001</fromAddress>" +
" <toAddress>6002</toAddress>" +
"</Dialog>"
)
HEADERS = {
'authorization': "Basic
QWdlbnQwMDE6Y2lzY29wc2R0",
'content-type': "application/xml",
'cache-control': "no-cache",
}
RESPONSE = requests.request("POST", URL,
data=PAYLOAD, headers=HEADERS)
print(RESPONSE.text)
print(RESPONSE.status_code)
Finesse Gadgets
As indicated earlier in this chapter, the Finesse desktop
application is an OpenSocial gadget container. This
means that an agent or anyone else can customize what
is on the desktop. Gadgets are built using HTML, CSS,