You're absolutely right - I was looking in the wrong place.
Thanks, again.
Original Message:
Sent: 09-27-2023 07:40
From: Lawrence Drayton
Subject: Bulk delete recordings based on Session DNIS
Anytime Tim :)
Just checking you are using the segments filter and not the conversation filter - those attributes sound like the conversationFilters
------------------------------
Lawrence Drayton
Prvidr Pty Ltd
------------------------------
Original Message:
Sent: 09-27-2023 07:34
From: Tim Speakman
Subject: Bulk delete recordings based on Session DNIS
Thanks for the rapid response Lawrence, it's much appreciated.
I was looking at that method but the docs didn't list "dnis" as a valid dimension:
(string) Left hand side for dimension predicates.Valid values: conversationEnd, conversationId, conversationInitiator, conversationStart, customerParticipation, divisionId, externalTag, mediaStatsMinConversationMos, originatingDirection.
I will give it a shot and let you know how it goes.
------------------------------
Tim Speakman
Auto Trader Limited
Original Message:
Sent: 09-27-2023 07:22
From: Lawrence Drayton
Subject: Bulk delete recordings based on Session DNIS
Hey Tim,
I've had this kind of scenario a few times, what you will need to do is POST a recording job (/api/v2/recording/jobs) with a payload like below - please check it/test etc but from your explanation would be something like that. The action date needs to be in the future (can be a few mins) and the dnis value needs to be the target number etc, or whatever way you want to narrow your search.
You will then get a response with a job ID which you need to put into a PUT (/api/v2/recording/jobs/JOBIDHERE) and the payload needs to be {"state": "PROCESSING"} This will then start the job (after it's ready) and away you go
{ "action": "DELETE", "actionDate": "2023-09-27T14:00:00.000Z", "includeRecordingsWithSensitiveData": true, "includeScreenRecordings": true, "clearExport": false, "conversationQuery": { "segmentFilters": [ { "type": "and", "predicates": [ { "type": "dimension", "dimension": "dnis", "operator": "matches", "value": "+61299999999" } ] } ], "interval": "2023-09-26T14:00:00.000Z/2023-09-27T14:00:00.000Z" }}
------------------------------
Lawrence Drayton
Prvidr Pty Ltd