GET /api/v2/call
Search for call(s) within the search criteria.
QUERY STRING PARAMETERS
afterid optional | After retrieving a previous result set, include only records after the previous maximum id. |
---|---|
maxresults optional | The maximum amount of records to return. The default value is 100 with a maximum value of 1,000. |
datetimemin optional | Only return records on or after this time within the timezone of the authenticated user. Format is ISO, e.g. 2013-05-01 1:12:00. |
datetimeminutc optional | Only return records on or after this time in UTC. Format is ISO, e.g. 2013-05-01 1:12:00. |
datetimemax optional | Only return records on or before this time within the timezone of the authenticated user. Format is ISO, e.g. 2013-05-01 1:12:00. |
datetimemaxutc optional | Only return records on or before this time in UTC. Format is ISO, e.g. 2013-05-01 1:12:00. |
callerphonenumber optional | Only return records matching this caller phone number. |
callername optional | Only return records matching this caller name. |
destinationphonenumber optional | Only return records matching this destination phone number. |
destinationname optional | Only return records matching this destination name. |
subject optional | Only return records matching this subject. |
rating optional | Only return records matching this rating. Values are in the range of 0 – 5. |
direction optional | Values can be ‘incoming’, ‘outgoing’ and ‘internal’. |
handsetgroup optional | Only return records matching handsets within the provided handset group name. |
tag optional | Only return records containing this tag. |
voipcallid optional | Only return a record matching this voipcallid |
RESULT CODE
200 | OK |
---|---|
401 | Unauthorized |
406 | SSL must be used |
500 | Server Error |
RESULT BODY
id | The unique call id. This will be needed when calling other api functions. |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
startdatetime | The time that the call began. The time is reported in the timezone configured for the authenticated user. |
||||||||||
startdatetimeutc | The time that the call began. The time is reported as UTC. |
||||||||||
type | The type of call. Either ‘recorded’, ‘discarded’, ‘unanswered’ or ‘uploading’. |
||||||||||
typediscardedreason | If the call was discarded, an explanation of the reason. |
||||||||||
answerdelayms | If the call was recorded, the delay in milliseconds between ringing and answer. |
||||||||||
direction | The direction of the call. Either ‘incoming’, ‘outgoing’, ‘internal’ or ‘unknown’. |
||||||||||
durationseconds | The duration of the call in seconds. |
||||||||||
caller |
|
||||||||||
destination |
|
||||||||||
subject | The subject of the call. |
||||||||||
rating | The rating of the call. Values are in the range of 0 – 5. |
||||||||||
tags | An array of selected tags. |
||||||||||
audiourl | A url containing the location of the audio. |
||||||||||
audiocontenttype | The mime content type of the audio. e.g. ‘audio/mpeg’ or ‘audio/wav’. |
||||||||||
audiolengthbytes | The length of the audio recording in bytes. |
||||||||||
audiomd5hash | The md5 hash of the call audio. This can be used to compare a reproduction at a later time for authenticity. |
EXAMPLE REQUEST
Example;- GET https://api.calln.com/api/v2/call?datetimemin=2013-05-01%201%3A12%3A0&datetimemax=2013-06-01%201%3A12%3A0&maxresults=5 Result;- 200 (OK) [{"id":32155584,"startdatetimeutc":"2017-04-11 5:41:30","startdatetime":"2017-04-11 15:41:30","type":"recorded","typediscardedreason":"","answerdelayms":4688,"direction":"incoming","durationseconds":188,"caller":{"phonenumber":"0401111111","name":"Finance Incoming Call","macaddress":"843DC621FA44","mediaendpoint":"","keypresses":[],"sentimentanalysis":"unknown"},"destination":{"phonenumber":"0393196600","name":"Lee Smart","macaddress":"0004F2BEA5B4","mediaendpoint":"","keypresses":[],"sentimentanalysis":"unknown"},"subject":"","rating":0,"tags":[],"audiourl":"https://api.calln.com/api/v2/callaudio/32155584","audiocontenttype":"audio/mpeg","audiolengthbytes":565531,"audiomd5hash":"fa2b36223f6b6364f5b7aa8b6c37a226"},{"id":32155585,"startdatetimeutc":"2017-04-11 5:42:30","startdatetime":"2017-04-11 15:42:30","type":"recorded","typediscardedreason":"","answerdelayms":1000,"direction":"incoming","durationseconds":122,"caller":{"phonenumber":"0401111111","name":"Finance Incoming Call","macaddress":"843DC621FA44","mediaendpoint":"","keypresses":[],"sentimentanalysis":"unknown"},"destination":{"phonenumber":"0393196600","name":"Lee Smart","macaddress":"0004F2BEA5B4","mediaendpoint":"","keypresses":[],"sentimentanalysis":"unknown"},"subject":"","rating":0,"tags":[],"audiourl":"https://api.calln.com/api/v2/callaudio/32155585","audiocontenttype":"audio/mpeg","audiolengthbytes":1365566,"audiomd5hash":"fa2b36223f6b6364f5b7aa8b6c37a226"}]
Using Curl
curl "https://api.calln.com/api/v2/call?datetimemin=2013-05-01%201%3A12%3A0&datetimemax=2013-06-01%201%3A12%3A0&maxresults=5" -H "Authorization: Basic username:password | base64" -X GET