Bulk Recording Download Issues

Hi All,

I'm following this tutorial to bulk download a number of recordings:
https://developer.mypurecloud.com/api/tutorials/recordings-downloader/index.html?language=nodejs&step=1

I am using the code 'as is' for the most part, the only modification I have made is to add the following on line 14:
client.setEnvironment(platformClient.PureCloudRegionHosts.ap_southeast_2);

When I execute this in node (from a number of different machines) I receive the following console output (I have removed duplicate lines):

prompt: Enter Client ID:: REDACTED
prompt: Enter Client Secret: : REDACTED
prompt: Enter Date Interval (YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss): : 2021-03-22T03:00:00/2021-03-22T03:18:00
Start batch request process
Added a535e027-a116-4768-b7bd-d86dc2be3d39 to batch request
Added 20c12020-4e11-4f78-ba3c-3eb42259342a to batch request
Added 642a3e72-e3fd-41df-8414-2fd67fdaa561 to batch request
Added 06cbbae6-fc3f-4cc3-b3b8-fe9717af8f08 to batch request
Added fddc0491-52ea-4932-bf13-97745ee178f7 to batch request
Batch Result Status:0/5
Batch Result Status:1/5
Batch Result Status:2/5
Batch Result Status:3/5
Batch Result Status:4/5
Skipping this recording. Reason: undefined
Skipping this recording. Reason: undefined
Skipping this recording. Reason: undefined
Skipping this recording. Reason: undefined
Skipping this recording. Reason: undefined

I am not sure why these recordings are being skipped. It seems 'undefined' as recording.errorMsg is being returned and is being picked up with this logic:

            // If there is an errorMsg skip the recording download
            if (recording.errorMsg !== '') {
                console.log("Skipping this recording. Reason:  " + recording.errorMsg);
                continue;

Has anyone seen/overcome this?
Does anyone know why the getRecordingStatus function runs so slowly? For my example with 5 interactions, this took about 5 mins to run.

Thanks in advance!

Hi,

It's possible that the tutorial should be updated to skip undefined error messages as well as empty error messages. If you do a trace of the recording variable you may get more information as to whether it's in a successful state or not.

As for getRecordingStatus taking long to respond; The recordings are prepared for download when the request is submitted and this can take some time. getRecordingStatus polls for the job to be completed and returns after all recordings are ready.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.