Recording Data Example
In these examples, we'll go over the setup and queries required to test the various Recording Data APIs functionality.
Common Setup
Create a Service User
Within Chronicall, create a new Service User. This will provide us with an authentication key.
- Create a new user in User Management > User Accounts.
- Click the User drop-down menu and select .
- Enter a name in the Name field and select the "Service User" option at the bottom.
- Save your changes.
Once completed, you will find the authentication key within API Enablement > Service Users.
Configure Agent for Recording
Within Chronicall, we will configure an agent to have their calls recorded.
- Start by going to Recording > Manage Recording Rules.
- You may have to click "Add" to bring you to a new rule configuration shown below.
- Give your rule a title; we will use "test".
- Add agents you want to have recorded using this rule.
- Click OK.
Once you have configured the recording rule, you must call one of the agents you selected in your rule configuration. If you do not call, there will be no recorded messages to query.
Common Postman Setup
Download and install the Postman application at the Postman Site.
Launch Postman.
Create a new Request for each API request.
- We'll name the Request "Recording Demonstration".
- You may also need to create a "Collection." We'll call ours "Sample Collection".
In your new request configure the authorization.
- Within Postman, click the Authorization tab.
- Set the Type to Bearer Token.
- Copy the Service User Authentication Key created earlier, which is found in API Enablement > Service Users, and paste it here.
Get a Single Recording
After following the "Common Setup" above, we will update the URL query within Postman.
- Change the API type to "GET".
- Replace the request URL with http://localhost:9080/rest/api/v1/recordings/{recording-key}/audio?format={format}
Please notte that to find the "recording-key" refer to Obtaining a Recording/Call Key.
Arguments | Description |
---|---|
recording‑key | The recording key for the recording for which the audio file is requested. |
format (optional) | The audio file type returned. Supported audio types are spx (default) and wav. |
We are now ready to submit our query. Click on Send within Postman. You will see the resulting response below in the Response field. (The encoded audio message)
Get a Call's Recordings
After following the "Common Setup" above, we will update the URL query within Postman.
- Change the API type to "GET".
- Replace the request URL with http://localhost:9080/rest/api/v1/calls/{call-key}/audio?format={format}
Please note that to find the "call-key" refer to Obtaining a Recording/Call Key.
We are now ready to submit our query. Click on Send within Postman. You will see the resulting response below in the Response field. (The encoded audio message)
External Listen Link to a Recording
After following the "Common Setup" above, within Chronicall we will set the protocol for Externally Accessible Address. This is found in Admin (System) > System Settings > Basic Settings > Externally Accessible Address. For this test http://Localhost:9080 is what we will use.
Configure the Query
Within Postman update the URL query of the new request we made in "Common Setup."
- Change the API type to "POST".
- Replace the request URL with http://localhost:9080/rest/api/v1/recordings/{recording-key}/external-listen-link
Please note that to find the "recording-key" refer to Obtaining a Recording/Call Key.
We are now ready to submit our query. Click on Send within Postman. You will see the resulting response below in the Response field.
We can further test the link by going to a web browser of your choice and going to the link provided in the query result. You will see the resulting page below where the recording is playable.
External Listen Link to a Call's Recordings
After following the "Common Setup" above, within Chronicall we will set the protocol for Externally Accessible Address. This is found in Admin (System) > System Settings > Basic Settings > Externally Accessible Address. For this test http://Localhost:9080 is what we will use.
Configure a Query
Within Postman update the URL query of the new request we made in "Common Setup."
- Change the API type to "POST".
- Replace the request URL with http://localhost:9080/rest/api/v1/calls/{call-key}/external-listen-link
Please note that to find the "call-key" refer to Obtaining a Recording/Call Key.
We are now ready to submit our query. Click on Send within Postman. You will see the resulting response below in the Response field.
We can further test the link by going to a web browser of your choice and going to the link provided in the query result. You will see the resulting page below where the recording is playable.
Get Call Recording Data
After following the "Common Setup" above, we will update the URL query within Postman.
- Change the API type to "POST".
- Replace the request URL with http://localhost:9080/rest/api/v1/calls/{call-key}/recordings
Please note that to find the "call-key" refer to Obtaining a Recording/Call Key.
We are now ready to submit our query. Click on Send within Postman. You will see the resulting response below in the Response field.
Updated over 4 years ago