Retrieve call sessions
GET
/call_sessions/list
Retrieves a list of call sessions, and 100 sessions will be returned each time.
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.paginationinteger
required
The pagination of paging.pagesizeinteger
required
The pagesize of paging.sort_byenum
required
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.
Sample Request
https://example.com/api/call_sessions/list?access_token=196ACE20C6F34027895F7F95402BB164&pagesize=100&pagination=1&sort_by=DEFAULT
Response
Placeholders
paginationinteger
required
The pagination of paging.pagesizeinteger
required
The pagesize of paging.sort_byenum
required
Values include "DEFAULT" and "Optional". Default value will be used when user does not specify value for this field.page_countinteger
required
The total count of pages.countinteger
required
Current pagesize.sessionsarray
required
Show child attributesCollection of call session objects.
Sample Response
{
"pagination": 1,
"pagesize": 100,
"sort_by": "DEFAULT",
"page_count": 100,
"count": 100,
"sessions": [
{
"session_id": 123456,
"caller": "caller",
"callee": "callee",
"start_time": "1970-01-01 00:00:00",
"answered_time": "1970-01-01 00:00:00",
"duration": 60
}
]
}
End a call session
POST
/call_sessions/destroy
Request
Placeholders
access_tokenstring
required
Access token is a 32-byte string with validity of 30 seconds.session_idinteger
required
Session ID of call session that is to be ended. It is returned in call_sessions/list.
Sample Request
{
"access_token": "196ACE20C6F34027895F7F95402BB164",
"session_id": "111"
}
Response
Placeholders