9.4 Retrieve recording list
The retrieveMetaDataByHour api allows you to retrieve a list of recordings for any one hour period.
This api is useful if you want to download recordings on a regular basis.
You should be aware that Noojee Contact may split the recording of a call into multiple ‘legs’ and as such you may need to retrieve each leg for a recording.
The api takes a date and an hour. When considering which recordings to retrieve it returns any legs that ‘ended’ in that one hour block. As these are legs the entire recording may not have completed when you retrieve a leg. You should normally wait at until a few minutes after the hour before requesting the hour.
e.g. wait until 4:05 before requesting the recordings for 3rd hour.
The hour is zero based so to get recordings from midnight to 1am pass hour=0.
The hour uses a 24 hour clock so to get the calls for 1pm to 2pm pass in hour=13 just after 2pm.
Rate limited
The api is rate limited to a max of 1 per minute. You will receive an error if you attempt to make the call more frequently.
If the call is successfully the http code 200 will be returned otherwise an appropriate http error code is returned.
RetrieveMetaDataByHour
NOTE: This is a POST not a get.
curl -X POST 'https://<fqdn>/njadmin/rest/RecordingAPI/retrieveMetaDataByHour?apiKey=xxxxxxxxxxxxx&date=2021/09/14&hour=15'
https://<fqdn>/njadmin/rest/RecordingAPI/retrieveMetaDataByHour?apiKey=xxxxxxxxx&date=2021/09/14&hour=15
The method returns a json encoded array/map containing any matching calls. There will be an entry in the array for each recording that ended during the hour.
[
{
"Destination": "123",
"UniqueId": "1631595787.5",
"Username": "NoojeeAdmin",
"Start": "Tue Sep 14 15:03:30 AEST 2021",
"Duration": "4",
"Tag": "",
"Direction": "Inbound",
"CallRecordId": "6468",
"DID": "7601",
"Source": "500",
"callend": "Tue Sep 14 15:03:34 AEST 2021",
"Leg": "1"
},
{
"Destination": "123",
"UniqueId": "1631595818.8",
"Username": "NoojeeAdmin",
"Start": "Tue Sep 14 15:03:47 AEST 2021",
"Duration": "4",
"Tag": "",
"Direction": "Inbound",
"CallRecordId": "6469",
"DID": "7601",
"Source": "500",
"callend": "Tue Sep 14 15:03:51 AEST 2021",
"Leg": "1"
},
{
"Destination": "123",
"UniqueId": "1631595839.11",
"Username": "NoojeeAdmin",
"Start": "Tue Sep 14 15:04:07 AEST 2021",
"Duration": "15",
"Tag": "",
"Direction": "Inbound",
"CallRecordId": "6470",
"DID": "7601",
"Source": "500",
"callend": "Tue Sep 14 15:04:22 AEST 2021",
"Leg": "1"
},
{
"Destination": "123",
"UniqueId": "1631596145.14",
"Username": "NoojeeAdmin",
"Start": "Tue Sep 14 15:09:16 AEST 2021",
"Duration": "68",
"Tag": "",
"Direction": "Inbound",
"CallRecordId": "6471",
"DID": "7601",
"Source": "500",
"callend": "Tue Sep 14 15:10:24 AEST 2021",
"Leg": "1"
}
]
The following fields are returned:
Field | Description |
---|---|
Callend | The date/time that the Leg of the recording ended. A recording may have multiple legs and a recording may not be for the full duration of the call. |
CallRecordId | A system wide unique id for the recording. |
DID | If the call is an inbound call then this is the DID that the caller dialed. For internal calls this is set to 'internal'. |
Destination | The Phone number of that party that answered the call. |
Direction | The direction of the call. This can be ‘Inbound’ or ‘Outbound’ or ‘Internal’. An internal call is a call between two extensions. |
Duration | The length of this leg of the recording in seconds. |
Leg | A call can be split into multiple recording legs. The Leg is a 1 based integer indicate order of this leg. The |
Source | The phone number that originated the call. For outbound calls this will be the extension no. For inbound calls this is the caller id (if available). |
Start | The start date/time of this leg of the recording. |
Tag | If the the recording has been tag via the recording user interface this field will contain the tag. Otherwise it will be an empty string. |
UniqueId | A system wide unique identifier for the call. |
Username | The Noojee Contact username of the person that made or took the call. Note that calls can be recorded even if they are never answered. |