Paging Information
Supported Operations: HTTP GET The following GET query string parameters allow you to limit the list returned.
Parameters are case-sensitive

Request Parameters

Parameter
Description
Page
The current page number. Zero-indexed, so the first page is 0.
NumPages
The total number of pages.
PageSize
How many items are on each page.
Total
The total number of items in the list.
Start
The position in the overall list of the first item on this page
End
The position in the overall list of the last item on this page.

Example

The command below will return a single item from the list of calls using the PageSize parameter
CURL
1
curl -X GET https://api.teleapi.net/call/2012-04-24/Accounts/ACCOUNT_SID/Calls.json?PageSize=1 \
2
-u 'teleapi-Token'
Copied!
The result of the PageSize parameter:
1
{
2
"page": 0,
3
"num_pages": 75,
4
"page_size": 1,
5
"total": 75,
6
"start": "0",
7
"end": "0",
8
"uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls",
9
"first_page_uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls?Page=0&PageSize=1",
10
"previous_page_uri": "null",
11
"next_page_uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls?Page=1&PageSize=1&AfterSid=IDd3ae[email protected]sip.nexmo.com",
12
"last_page_uri": "/2012-04-24/Accounts/AC61148eb9d61281750ccc0e13c6094fe1/Calls?Page=75&PageSize=1",
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
}
Copied!

Additional Paging Information

The following returns URIs to the next, previous, first and last pages of the returned list.

Request Parameters

Parameter
Description
Uri
The URI of the current page.
Firstpageuri
The URI for the first page of this list.
Nextpageuri
The URI for the next page of this list.
Previouspageuri
The URI for the previous page of this list
Lastpageuri
The URI for the last page of this list.

Sorting Information

Supported Operations: HTTP GET. You can use the SortBy GET query parameter to determine which attribute you want to sort by and in which direction; direction can either be 'asc' for ascending and 'desc' for descending sort ordering. Use the following Here’s the overall format: SortBy=: <sorting attribute>:<direction>. If no direction parameter is provided, then the listing of calls is sorted by the attribute in ascending order.

SortBy Attributes

Parameter
Description
DateCreated
Sort by the date the call was created.
From
Sort by the party who initiated the call.
To
Sort by the party who received the call.
Direction
Sort by the direction of the call.
Status
Sort by the status of the call.
Duration
Sort by the duration of the call.
Price
Sort by the price of the call, if applicable.

Example

The command below will return calls sorted by the creation date in ascending order using SortBy parameter:
CURL
1
curl -X GET https://api.teleapi.net/call/2012-04-24/Accounts/ACCOUNT_SID/Calls.json?SortBy=DateCreated:asc \
2
-u 'teleapi-Token'
Copied!
The result of the SortBy parameter:
1
{
2
"page": 0,
3
"num_pages": 1,
4
"page_size": 50,
5
"total": 75,
6
"start": "0",
7
"end": "49",
8
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls",
9
"first_page_uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls?Page=0&PageSize=50",
10
"previous_page_uri": "null",
11
"next_page_uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls?Page=1&PageSize=50&AfterSid=ID4631[email protected]sip.nexmo.com",
12
"last_page_uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls?Page=1&PageSize=50",
13
"calls": [
14
{
15
"sid": "IDa721a1e38bc040c08625cb9617968482-CA9a6fe392696d4efcb4c0cc55cb019ee8",
16
"InstanceId": "IDa721a1e38bc040c08625cb9617968482",
17
"date_created": "Mon, 9 Mar 2020 23:18:12 +0000",
18
"date_updated": "Mon, 9 Mar 2020 23:18:28 +0000",
19
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
20
"to": "16502636146",
21
"from": "13103602085",
22
"phone_number_sid": "AC61148eb9d61281750ccc0e13c6094fe1",
23
"status": "completed",
24
"start_time": "2020-03-09T23:18:12.000Z",
25
"end_time": "2020-03-09T23:18:28.000Z",
26
"duration": 16,
27
"price_unit": "USD",
28
"direction": "inbound",
29
"api_version": "2012-04-24",
30
"caller_name": "HARY B.",
31
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDa721a1e38bc040c08625cb9617968482-CA9a6fe392696d4efcb4c0cc55cb019ee8.json",
32
"subresource_uris": {
33
"notifications": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDa721a1e38bc040c08625cb9617968482-CA9a6fe392696d4efcb4c0cc55cb019ee8/Notifications.json",
34
"recordings": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDa721a1e38bc040c08625cb9617968482-CA9a6fe392696d4efcb4c0cc55cb019ee8/Recordings.json"
35
}
36
},
37
{
38
"sid": "ID1f2d67b716b34162954fbfc7d7d50b89-CA8ff8cd0aabc14aef9c764b5807801e85",
39
"InstanceId": "ID1f2d67b716b34162954fbfc7d7d50b89",
40
"date_created": "Wed, 11 Mar 2020 20:12:46 +0000",
41
"date_updated": "Wed, 11 Mar 2020 20:12:47 +0000",
42
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
43
"to": "12012993898",
44
"from": "12965874120",
45
"phone_number_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
46
"status": "completed",
47
"start_time": "2020-03-11T20:12:47.000Z",
48
"end_time": "2020-03-11T20:12:47.000Z",
49
"duration": 0,
50
"price_unit": "USD",
51
"direction": "inbound",
52
"api_version": "2012-04-24",
53
"caller_name": "V3111612340000193824",
54
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/ID1f2d67b716b34162954fbfc7d7d50b89-CA8ff8cd0aabc14aef9c764b5807801e85.json",
55
"subresource_uris": {
56
"notifications": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/ID1f2d67b716b34162954fbfc7d7d50b89-CA8ff8cd0aabc14aef9c764b5807801e85/Notifications.json",
57
"recordings": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/ID1f2d67b716b34162954fbfc7d7d50b89-CA8ff8cd0aabc14aef9c764b5807801e85/Recordings.json"
58
}
59
},
60
{
61
"sid": "IDfbf7e812e3b44ba7a82a757d5dacca0c-CAb43f9a08c3554739aba0fe05ca04d464",
62
"InstanceId": "IDfbf7e812e3b44ba7a82a757d5dacca0c",
63
"date_created": "Thu, 12 Mar 2020 15:31:12 +0000",
64
"date_updated": "Thu, 12 Mar 2020 15:31:29 +0000",
65
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
66
"to": "16502636146",
67
"from": "19725464888",
68
"phone_number_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
69
"status": "completed",
70
"start_time": "2020-03-12T15:31:12.000Z",
71
"end_time": "2020-03-12T15:31:29.000Z",
72
"duration": 16,
73
"price_unit": "USD",
74
"direction": "inbound",
75
"api_version": "2012-04-24",
76
"caller_name": "Tommy Cameron",
77
"uri": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDfbf7e812e3b44ba7a82a757d5dacca0c-CAb43f9a08c3554739aba0fe05ca04d464.json",
78
"subresource_uris": {
79
"notifications": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDfbf7e812e3b44ba7a82a757d5dacca0c-CAb43f9a08c3554739aba0fe05ca04d464/Notifications.json",
80
"recordings": "/2012-04-24/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/IDfbf7e812e3b44ba7a82a757d5dacca0c-CAb43f9a08c3554739aba0fe05ca04d464/Recordings.json"
81
}
82
}
83
]
84
}
Copied!