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
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide