UCCX Phone Books - Powershell

The UCCX Server Documentation API for Phonebook's was slightly out of date, so I have referenced in my blog for future use.

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

List specific details for a phone book
https://servername.com:8445/finesse/api/PhoneBook/4/

List contacts for specific phone book
https://servername.com:8445/finesse/api/PhoneBook/4/Contacts/

Import (using Powershell)
$FileName = ".\pb.csv"
$Password = ConvertTo-SecureString “passwordhere” -AsPlainText -Force
$Cred = New-Object System.Management.Automation.PSCredential (“username”, $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

Cisco API Reference

Comments

Popular posts from this blog

Create bootable CUC CUCM CUP Image / ISO

Configuring Oracle 12c backups on Veritas Backup Exec 16.

Configuring Cisco CME Voice Gateway (VG) for incoming and outgoing calls using Sipgate trunk