Call Recording API
Recordings are created in HTCC by an external Genesys component and are accessible via the REST API. The /recordings URI is used to access recordings.
Operations
The following operations are supported for the recordings resource:
Operation | Description | Permissions |
---|---|---|
GET | Returns a list of all recording URIs for the contact center (filterable, queryable via parameters). Note that GET /recordings without any query parameters returns an error. This operation is only permitted with a query parameter as GET /recordings could result in millions of results. If GET with a query results in a data set > 100 recordings, only the first 100 are returned. | Contact Center Admin |
In addition, the following operations are available for */recordings/{id}:
Operation | Description | Permissions |
---|---|---|
GET | Returns a "recording" resource that corresponds to a single call with a unique ID (note that this might consist of multiple actual media files). | Contact Center Administrator |
Query Parameters
The Contact Center Administrator is able to specify query parameters to the GET /recordings operation in order to specify a set of criteria for the returned recordings. The available parameters are described below.
Parameter Name | Description |
---|---|
callerPhoneNumber | Retrieves all recordings that apply to any call containing the specified "ani" attribute. The exact match of the stored number (alphanumeric-only) and request parameter (alphanumeric-only) is used. The request string can contain the * wildcard (which can substitute any number of any symbols in the request). Search is case-sensitive. |
dialedPhoneNumber | Retrieves all recordings that apply to any call containing the specified "dnis" attribute. The exact match of the stored number (alphanumeric-only) and request parameter (alphanumeric-only) is used. The request string can contain the * wildcard (which can substitute any number of any symbols in the request). Search is case-sensitive. |
startTime | Retrieves all recordings that started after the specified time. |
endTime | Retrieves all recordings that ended before the specified time. |
userName | Retrieves all recordings in eventHistory->contacts in which the passed userName/firstName/Lastname is present. The user can use wildcards to specify only part of the username/firstname/lastname. If more than 1 word is used (divided by spaces), the records containing any of provided terms as username, firstname or lastname will be included. If you want to retrieve records containing ALL terms, the AND keyword should be used.
For example:
|
Note that multiple query parameters can be applied as part of one request. When this is the case, they form an AND condition for the operation (for example, GET /recordings?startTime=A&endTime=B will retrieve all recordings between A and B). This operation will return the response containing the array of matching call recordings (length up to 100). This array can be empty if no matching recording found.
Example
The following example retrieves a call recording descriptor using a simple query
GET /recordings/recordings?startTime=0 { "statusCode": 0, "recordings": [ { "id": "00PV5Q27MG8AB8VNE49362LAES000013", "callerPhoneNumber": "+16504668888", "dialedPhoneNumber": "+14155551234", "startTime": "2013-05-17T19:45:32.000+0000", "stopTime": "2013-05-17T22:15:36.000+0000", "mediaFiles": [ { "startTime": "2013-05-17T19:45:32.000+0000", "stopTime": "2013-05-17T22:15:36.000+0000", "callUUID": "callUUID", "mediaUri": "http://172.21.80.29:8080/cloud-web/api/v2/recordings/00PV5Q27MG8AB8VNE49362LAES000013/play/0ce11ff0-a6cf-43fa-aaa1-baad43ac98b4.mp3" } ], "eventHistory": [ { "occurredAt": "2013-05-18T22:25:56.000+0000", "contact": { "type": "User", "phoneNumber": "+14103585834", "userName": "admin@genesys", "firstName": "Slava", "lastName": "Sayko" }, "event": "Left" } ], "region": "development" } ] }
Please note the substitution of mediaURI.