Downloading Call Recordings in Bulk
Sharpen’s Insights tool provides native access to listen to and download recordings. However, some may want to retrieve call recordings outside of the to application interface. This document describes how to leverage a few Sharpen APIs to download several call recordings in bulk.
Screenshots below are taken from Postman, a common REST API tool. If you are scripting the API calls, this is more likely to be done in a scripting language such as python. Visual examples are provided to show expected inputs and outputs.
Gather array of QCMIDs from spreadsheet or datasource.
Commonly done via the queryAPI
Build loop that executes the getInteraction api for each QCMID
Executing through Postman looks like this
Parse through results to pull the “mixmonFileName”
Depending on how you’ll be organizing the results, it may be helpful to pull in other attributes such as cidNumber, queueCallManagerID, inboundNumber, etc.
Using the results, execute (in a looping fashion again) the getObjectLink api using the value from “mixmonFileName” retrieved in the previous step for filename. Additionally the getObjectLink api requires bucketName which for IZ0 is “mixrec”, or IZ1 is “iz-iz1-mixrec”.
Results look like this.
From here you have the recording URL which can be interfaced with a command like wget to download the file.
Iterate through GET requests to the returned URL to download recording
Keep in mind there’s an expiration date in unix time on that file. Attempting to retrieve the file after that time will result in failure.
Move downloaded files to final destination
API Reference
baseUrl
Isolation Zone 0 (IZ0) | Isolation Zone 1 (IZ1) |
---|---|
api.sharpencx.com | api-current.iz1.sharpen.cx |
Replace {{baseUrl}} with the appropriate base URL for the isolation zone your organization uses.
IZ0 - Your users login to app.sharpencx.com
IZ1 - Your users login to app.iz1.sharpen.cx
QueryAPI:
Method: POST
URL: https://{{baseUrl}}/V2/query/
cKey1: your company cKey1
cKey2: your company cKey2
method: query
q: queryAPI MySQL query (e.g.. SELECT * FROM `fathomQueues`.`queueCDR` WHERE `endTime` > “2023-12-01”)
Get Interaction:
Method: POST
URL: https://{{baseUrl}}/V2/queues/getInteraction/
cKey1
cKey2
uKey: uKey of user with permissions on customer account (we can help get the right user ukey for you)
queueCallManagerID
Get AWS file:
Method: POST
URL: https://{{baseUrl}}/V2/aws/getObjectLink/
cKey1
cKey2
bucketName: mixrec
fileName: mixmonFileName from getInteraction api