Bulk Delete API - fulfilled happens but doesnt work

I am trying to leverage the Bulk delete javascript mentioned in this tutorial:
https://developer.mypurecloud.com/api/tutorials/recordings-bulk-actions/index.html?language=nodejs&step=1

Currently I am just trying to target a conversation during a certain time for a specific user. I have it all working to where I am getting a fulfilled state being returned when checking on the job status. However nothing seems to happen with the recording. I am attempting to set the delete date to october 2019 but its not updating the interaction when I go and actually look at it. I am able to utilize developer tools to simulate my script (using the various job related api calls and the same parameters in my script) and it works perfectly.
This is how my job status looks:
{
id: '2cf53eb4-74ba-402d-aba9-77f70891de36',
state: 'FULFILLED',
recordingJobsQuery: [Object],
dateCreated: '2020-05-15T18:09:49.924Z',
totalConversations: 1,
totalRecordings: 1,
totalProcessedRecordings: 0,
percentProgress: 0,
selfUri: '/api/v2/recording/jobs/2cf53eb4-74ba-402d-aba9-77f70891de36',
user: [Object]
},

The total processed never increments when using the my script. When using developer tools I get this (note this is a different interval):
{
"id": "cc57931e-990e-4865-bc2f-1b41b0732cb1",
"state": "FULFILLED",
"recordingJobsQuery": {
"action": "DELETE",
"actionDate": "2019-10-27T00:00:00Z",
"includeScreenRecordings": true
},
"dateCreated": "2020-05-15T17:16:48.243Z",
"totalConversations": 2,
"totalRecordings": 2,
"totalProcessedRecordings": 2,
"percentProgress": 100,
"selfUri": "/api/v2/recording/jobs/cc57931e-990e-4865-bc2f-1b41b0732cb1",
"user": {
"id": "55463d6e-cc2a-45ef-869b-4ae4da6d4e8a",
"selfUri": "/api/v2/users/55463d6e-cc2a-45ef-869b-4ae4da6d4e8a"
}

I don't see what I could be doing wrong unless the initial job creation is broken in my script and the job is somehow not created properly.

As a test I decided to try and use the script just to create the job, then use developer tools to execute the job. This still fails to work (technically successful with "Fulfilled" state but it doesn't actually set the delete date). I then attempted to create the job and execute with developer tools and it worked perfect.

This is what I am using for the createRecordingBulkJob() function:
return recordingApi.postRecordingJobs({
action: 'DELETE', // set to "EXPORT" for export action
actionDate: '2019-10-27T00:00:00.000Z',
// integrationId: '-- integration id here --', // Only required when action is EXPORT
includeScreenRecordings: true,
conversationQuery: {
interval: '2020-02-28T15:49:00.000Z/2020-02-28T15:59:00.000Z',
segmentFilters:
[
{
type: 'or',
predicates:
[
{
type: 'dimension',
dimension: 'userId',
operator: 'matches',
value: '55463d6e-cc2a-45ef-869b-4ae4da6d4e8a'
}
]
}
],
order: 'asc',
orderBy: 'conversationStart'
}
})
}

And this is how I am using the api in developer tools:
{
"action": "DELETE",
"actionDate": "2019-10-27T00:00:00.000Z",
"includeScreenRecordings": true,
"conversationQuery": {
"interval": "2020-02-28T15:49:00.000Z/2020-02-28T15:59:00.000Z",
"segmentFilters": [
{
"type": "OR",
"predicates": [
{
"type": "dimension",
"dimension": "userId",
"operator": "matches",
"value": "55463d6e-cc2a-45ef-869b-4ae4da6d4e8a"
}
]
}
],
"order": "asc",
"orderBy": "conversationStart"
}
}

I can't seem to figure out what I am doing wrong here. Thanks you in advance for any help!

I'm not sure you're using this API for the correct use case. This is related to the integration to export recordings to Amazon S3. The delete action will delete recordings from your S3 integration, not from Genesys Cloud. If you're trying to remove a recording from Genesys Cloud, you'll need to do so by configuring appropriate policies. Configuration of recording policies is more appropriate for the Genesys Cloud Community Forum.

Hey Tim,

Unfortunately the recording policies are not retroactive and I need to basically go through and clean up the lack of recording policies. I was able to accomplish what I needed for the customer using dev tools and the exact same process of creating the job, executing and checking the status. I was able to confirm that the delete date was indeed set and it did remove the recordings. Is there anymore documentation surrounding these end points that would help better describe the use case? Can you help me understand the difference between the api end points I am hitting in dev tools versus the end points the script utilizes since they are from the PureCloud platform library (I also couldn't find documentation on the library itself).

These are the end point I am using in dev tools:

/api/v2/recording/jobs

I am trying to figure out another way around this limitation since these api end points seem to work within dev tools. Maybe I just need to hard code my api requests?

My apologies, the bulk job does two separate unrelated things. Only the export operation is related to the S3 integration.

Please open a case with Genesys Cloud Care to investigate further.

Are you referring to the SDKs? They are documented here: https://developer.mypurecloud.com/api/rest/client-libraries/

Ok thanks Tim, will do. Also yes that looks to be the documentation I was trying to find, thank you for that.

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