有奖捉虫:行业应用 & 管理与支持文档专题 HOT
管理员可通过该接口获取指定条件的通话记录。
说明:
REST API 目前处于内测期,您可以查询创建时间在七天内的通话数据。

接口说明

请求URL示列

https://xxxxxx/v1/records/get_records_by_filter?sdkappid=88888888&identifier=admin&usersig=xxx&random=99999999&contenttype=json

请求参数说明

下表仅列出调用本接口时涉及修改的参数及其说明,更多参数详情请参考 REST API 简介
参数
说明
xxxxxx
SDKAppID 所在国家/地区对应的专属域名:
中国:callkit.trtc.tencent-cloud.com
v1/records/get_records_by_filter
请求接口
sdkappid
创建应用时控制台分配的 SDKAppID
identifier
使用 IM 的管理员账号
usersig
App 管理员账号生成的签名,具体操作请参见 生成 UserSig?
random
请输入随机的32位无符号整数,取值范围 0 - 4294967295
contenttype
请求格式固定值为json

最高调用频率

200次/秒。

请求包示例

基础形式 创建房间
{
"startTimestamp": 1618705638,
"endTimestamp": 1618705738,
"callResult": "normal_end",
"callType": "single",
"numberPerPage": 20,
"page": 2
}

请求包字段说明

字段
类型
属性
说明
startTimestamp
Integer
必填
通话开始时间戳(秒级)
endTimestamp
Integer
选填
通话结束时间戳(秒级),不填默认为7天
callResult
String
选填
通话结果,不填默认为所有结果
callType
String
选填
通话类型,不填默认为所有类型
numberPerPage
Integer
选填
每页查询数量,默认为:100
page
Integer
选填
查询页数,不填默认为第一页

应答包字段示列

{
"errorCode": 0,
"errorMessage": "Success",
"requestId": "8ba14f64a1d92d38705eec775e1f3deb",
"data": {
"totalNum": 3,
"page": 2,
"callRecordList": [
{
"callId": "2ae7d549-c441-4a9b-87c0-61810fe19581",
"sdkAppId": 88888888,
"mediaType": "video",
"roomId": "456",
"startCallTs": 1688709003,
"acceptTs": 1688709003,
"endTs": 1689150030,
"caller": "123",
"totalUserNumber": 0,
"callType": "single",
"callResult": "offline",
"callees": [
"111",
"123"
]
},
{
"callId": "2ae7d549-c441-4a9b-87c0-61810fe19582",
"sdkAppId": 88888888,
"mediaType": "video",
"roomId": "456",
"startCallTs": 1688709303,
"acceptTs": 1688709303,
"endTs": 1689150030,
"caller": "123",
"totalUserNumber": 0,
"callType": "single",
"callResult": "offline",
"callees": [
"111",
"123"
]
},
{
"callId": "2ae7d549-c441-4a9b-87c0-61810fe19583",
"sdkAppId": 88888888,
"mediaType": "video",
"roomId": "456",
"startCallTs": 1688709903,
"acceptTs": 1688709903,
"endTs": 1689150030,
"caller": "123",
"totalUserNumber": 0,
"callType": "single",
"callResult": "offline",
"callees": [
"111",
"123"
]
}
]
}
}

应答包字段说明

字段
类型
说明
errorCode
Integer
错误码,0为成功
errorMessage
String
错误信息
requestId
String
请求的唯一 ID
totalNum
Integer
此次查询的总数量
page
Integer
当 page > 0 时 说明还有数据,将 page+1 可继续请求之后的数据。
callRecordList
Array
请参见:单条通话记录说明

单条通话记录说明

字段
类型
说明
callId
String
通话的唯一 ID
sdkAppId
Integer
您的 sdkAppId
mediaType
String
媒体类型:
video 视频通话
audio 音频通话
roomId
String
通话的房间 ID
startCallTs
Integer
通话发起的时间戳(秒级)
acceptTs
Integer
通话接通的时间戳(秒级)
endTs
Integer
通话结束的时间戳(秒级)
caller
String
主叫 userId
totalUserNumber
Integer
参与通话的总人数
callType
String
通话类型:
single 一对一通话
group 群组通话
callResult
String
通话结果:
cancel 取消:主叫方在接通前取消通话
reject 拒接:被叫方拒接。
not_answer未接听:被叫方超时未接听
normal_end 完成:通话接通并正常结束
call_busy 忙线:通话忙线
interrupt 中断:网络等原因导致通话中断
callees
Array
被叫且参与通话的 userId 列表
说明:
callResult 字段仅一对一通话可能显示所有类型,群聊仅有normal_end

错误码说明

除非发生网络错误(例如502错误),否则该接口的 HTTP 返回码均为200。实际的错误码、错误信息是通过应答包体中的 errorCode、errorMessage 来表示的。 公共错误码(70000到79999)请参见 错误码
错误码
含义说明
0
请求成功
50001
当前应用需要购买 TUICallKit 群组通话版套餐包方可使用
70011
未找到任何记录
未知错误码
未知错误,请 提交工单 联系技术人员
?


http://www.vxiaotou.com