ā02-01-2017 09:16 AM - last edited on ā03-25-2019 07:31 PM by ciscomoderator
Is there any way to bulk load Finesse Phone Books?
Thanks, Ted
ā02-01-2017 10:11 AM
The Finesse REST API allows you to create and modify phone books.
https://developer.cisco.com/site/finesse/docs/guides/rest-api-dev-guide/
You could write a script in Python or Powershell to use the API to upload phonebook data in CSV format.
ā04-17-2018 08:11 AM
Following the API guide, we're running into an issue:
We want to do an automatic import using powershell of a CSV in an existing phonebook in Finesse.
The response weāre getting is Bad request (400)ā¦
Invoke-WebRequest -Uri https://<FINESSESERVER>/finesse/api/PhoneBook/1/Contacts/csvFileContent -Method post -Credential $cred -InFile test.csv -ContentType "text/CSV"
Invoke-WebRequest : The remote server returned an error: (400) Bad Request.
Anyone knows what weāre doing wrong ?
Thx and kind regards !
ā04-17-2018 10:50 AM
ā11-28-2019 04:16 AM - edited ā02-22-2020 10:11 AM
$FileName = ".\pb.csv"
$Password = ConvertTo-SecureString āpasswordhereā -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential (āusernamehereā, $password)
Obviously, this is not very secure but its simply a proof of concept to do whatever you need;
Invoke-WebRequest - uri "https://servername.com:8445/finesse/api/PhoneBook/4/Contacts/csvFileContent" -Method Put -Credential $Cred -InFile $FileName
Download Phone Book - (4 being the ID of the phone book)
https://servername.com:8445/finesse/api/PhoneBook/4/Contacts/csvFileContent
if you post, you upload to the above link thats in the Powershell above.
List specific details for a phone book - (4 being the ID of the phone book)
https://servername.com:8445/finesse/api/PhoneBook/4/
List contacts for specific phone book - (4 being the ID of the phone book)
https://servername.com:8445/finesse/api/PhoneBook/4/Contacts/
Ref - http://squirrelsuccess.blogspot.com/2019/11/uccx-phone-books-powershell.html
Cheers
Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: