List Filter
Supported Operations: HTTP GET The following GET query string parameters allow you to limit the list returned.
Note: parameters are case-sensitive

Request Parameters

Parameter
Description
To
Only show calls to this phone number or Client identifier.
From
Only show calls from this phone number or Client identifier.
Status
Only show calls currently in this status. May be queued, ringing, in-progress, canceled, completed, failed, busy, or no-answer.
StartTime
Only show calls that started on this date/time or later, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-05T22:45:32) or, if you want to omit the time, YYYY-MM-DD (for example 2018-10-05).
​
When only a date is provided the time is assumed to be at midnight of the given date. Note that the given date/time is inclusive and is assumed to be in UTC timezone.
EndTime
Only show calls that ended on this date/time or earlier, given as an ISO-8601 date/time string, like YYYY-MM-DDTHH:MM:SS (for example 2018-10-06T02:10:03) or, if you want to omit the time, YYYY-MM-DD (for example 2018-10-06). When only a date is provided the time is assumed to be at midnight of the given date.
Note that the given date/time is inclusive and is assumed to be in UTC time zone.
ParentCallSid
Only show calls spawned by the call with this Sid.

Filter using the From parameter

The example below will only return Calls made from client Alice
CURL
NodeJS
Python
Java
1
curl -X GET https://api.teleapi.net/call/2012-04-24/Accounts/ACCOUNT_SID/Calls.json?From=Jane \
2
-u 'teleapi-Token'
Copied!
1
const request = require('request');
2
​
3
// Provide your Account Sid and Auth Token from your Console Account page
4
const ACCOUNT_SID = 'my_ACCOUNT_SID';
5
const AUTH_TOKEN = 'my_AUTH_TOKEN';
6
​
7
request({
8
method: 'GET',
9
url: 'https://api.teleapi.net/call/2012-04-24/Accounts/' + ACCOUNT_SID + '/Calls.json?From=Jane',
10
auth: { 'user': ACCOUNT_SID, 'pass': AUTH_TOKEN }
11
},
12
function (error, response, body) {
13
// Add your business logic below; status can be found at 'response.statusCode' and response body at 'body'
14
...
15
}
16
);
Copied!
1
from http.client import HTTPSConnection
2
from base64 import b64encode
3
​
4
# Provide your Account Sid and Auth Token from your Console Account page
5
ACCOUNT_SID = 'my_ACCOUNT_SID'
6
AUTH_TOKEN = 'my_AUTH_TOKEN'
7
​
8
userAndPass = b64encode(bytes(ACCOUNT_SID + ':' + AUTH_TOKEN, 'utf-8')).decode("ascii")
9
headers = { 'Authorization' : 'Basic %s' % userAndPass }
10
​
11
conn = HTTPSConnection('api.teleapi.net')
12
conn.request("GET", '/call/2012-04-24/Accounts/' + ACCOUNT_SID + '/Calls.json?From=Jane',
13
headers=headers)
14
res = conn.getresponse()
15
​
16
# Add your business logic below; status can be found at 'res.status', reason at 'res.reason' and response body can be retrieved with res.read()
17
...
Copied!
1
import java.net.URL;
2
import javax.net.ssl.HttpsURLConnection;
3
import java.io.*;
4
import java.util.Base64;
5
​
6
public class JavaSampleClass {
7
// Provide your Account Sid and Auth Token from your Console Account page
8
public static final String ACCOUNT_SID = "my_ACCOUNT_SID";
9
public static final String AUTH_TOKEN = "my_AUTH_TOKEN";
10
​
11
​
12
public static void main(String[] args) throws Exception {
13
String userAndPass = ACCOUNT_SID + ':' + AUTH_TOKEN;
14
String encoded = Base64.getEncoder().encodeToString(userAndPass.getBytes());
15
​
16
URL url = new URL("https://api.teleapi.net/call/2012-04-24/Accounts/" + ACCOUNT_SID + "/Calls.json?From=Jane");
17
HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
18
conn.setRequestProperty("Authorization", "Basic " + encoded);
19
conn.setRequestMethod("GET");
20
​
21
// Add your business logic below; response code can be obtained from 'conn.getResponseCode()' and input stream from 'conn.getInputStream()'
22
...
23
}
24
}
Copied!
The result will be similar to the one below
1
{
2
"page": 0,
3
"num_pages": 0,
4
"page_size": 50,
5
"total": 3,
6
"start": "0",
7
"end": "3",
8
"uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls",
9
"first_page_uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls?Page=0&PageSize=50",
10
"previous_page_uri": "null",
11
"next_page_uri": "null",
12
"last_page_uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls?Page=0&PageSize=50",
13
"calls": [
14
{
15
"sid": "IDd3ae[email protected]sip.nexmo.com",
16
"InstanceId": "IDd3ae1cc61f6c4a03be0cc4e4c89f3f50",
17
"date_created": "Tue, 7 Apr 2020 11:10:15 +0000",
18
"date_updated": "Tue, 7 Apr 2020 11:10:26 +0000",
19
"account_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
20
"to": "12012993898",
21
"from": "Jane",
22
"phone_number_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
23
"status": "completed",
24
"start_time": "2020-04-07T11:10:15.000Z",
25
"end_time": "2020-04-07T11:10:26.000Z",
26
"duration": 10,
27
"price_unit": "USD",
28
"direction": "inbound",
29
"api_version": "2012-04-24",
30
"caller_name": "Jane",
31
"uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/IDd3ae[email protected]sip.nexmo.com.json",
32
"subresource_uris": {
33
"notifications": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/IDd3ae[email protected]sip.nexmo.com/Notifications.json",
34
"recordings": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/IDd3ae[email protected]sip.nexmo.com/Recordings.json"
35
}
36
},
37
{
38
"sid": "ID3085[email protected]sip.nexmo.com",
39
"InstanceId": "ID308543a39dfd49b7a7231df9622763d8",
40
"date_created": "Tue, 7 Apr 2020 11:08:48 +0000",
41
"date_updated": "Tue, 7 Apr 2020 11:09:00 +0000",
42
"account_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
43
"to": "12012993898",
44
"from": "Jane",
45
"phone_number_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
46
"status": "completed",
47
"start_time": "2020-04-07T11:08:48.000Z",
48
"end_time": "2020-04-07T11:09:00.000Z",
49
"duration": 11,
50
"price_unit": "USD",
51
"direction": "inbound",
52
"api_version": "2012-04-24",
53
"caller_name": "Jane",
54
"uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID3085[email protected]sip.nexmo.com.json",
55
"subresource_uris": {
56
"notifications": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID3085[email protected]sip.nexmo.com/Notifications.json",
57
"recordings": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID3085[email protected]sip.nexmo.com/Recordings.json"
58
}
59
},
60
{
61
"sid": "ID248a[email protected]sip.nexmo.com",
62
"InstanceId": "ID248a2ae179cc490a9b5eb892af609ce8",
63
"date_created": "Mon, 6 Apr 2020 21:33:39 +0000",
64
"date_updated": "Mon, 6 Apr 2020 21:34:12 +0000",
65
"account_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
66
"to": "16502636146",
67
"from": "Jane",
68
"phone_number_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
69
"status": "completed",
70
"start_time": "2020-04-06T21:33:39.000Z",
71
"end_time": "2020-04-06T21:34:12.000Z",
72
"duration": 33,
73
"price_unit": "USD",
74
"direction": "inbound",
75
"api_version": "2012-04-24",
76
"caller_name": "Jane",
77
"uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID248a[email protected]sip.nexmo.com.json",
78
"subresource_uris": {
79
"notifications": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID248a[email protected]sip.nexmo.com/Notifications.json",
80
"recordings": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls/ID248a[email protected]sip.nexmo.com/Recordings.json"
81
}
82
}
83
]
84
}
Copied!
​