Python

Introduction

In this tutorial, you will learn how to get a list call recordings by a certain date. This enables you to minimize storage costs for call recordings you no longer need while ensuring a higher level of security. The content covered in this tutorial can help you when generating reports in order to remove calls that have little or no significance to the report or if you wish to remove call recordings in order to save money on call archives.

The Call Recording API allows you to retrieve all call recordings and allows for filtering by call date, extension, caller_id, direction (inbound or outbound) and more. Please have a look at the api reference to view all the possible filters.

In this example, you will query for the last 7 days of recordings and delete them. You will use a python script to query for the call recordings and then you will delete each of the recordings.

Python is the language used to build the following example; however, you can use any language with which you are most comfortable. The following uses a external library called Requests. You will need to install the Requests library using pip. In your terminal, type:

pip install requests

Delete company call recordings by date

Delete call recordings and on-demand call recordings by a certain date.



Steps