分类

通话记录

通话记录 – 按日期统计通话记录

按日期获取通话记录

GET

/api/cdr/:date

权限:通话记录

Header

字段类型描述
Content-Type字符串应用或JSON

参数

字段类型描述
date字符串日期格式为”YYYY-MM-DD”或”YYYY-MM”
items数字请求返回的总项数
currentpage数字请求的页码
endpoint数字endpoint
start_datetime字符串开始时间戳(ISO格式)
end_datetime字符串结束时间戳(ISO格式)

请求样例

/api/cdr/2017-05-05?items=100&currentpage=2

请求样例

/api/cdr/2018-05?endpoint=123456&start_datetime=2018-05-04T16:38:27.000Z&end_datetime=2018-05-09T16:38:27.000Z&items=3&currentpage=2

成功 200

字段类型描述
totalRows数字符合筛选日期的通话记录的总数量
rows对象数组通话记录列表
start_time字符串呼叫起始时间
end_time字符串呼叫结束时间
caller_id_name字符串主叫方名字
caller_id_number字符串主叫方号码
destination_number字符串通话记录被叫号码
direction字符串呼叫方向,“呼入”或“呼出”
minutes数字呼叫时长(分钟)
charge数字呼叫费用
rate数字呼叫费率

成功响应

HTTP/1.1 200 OK
{
“totalRows”: 4,
“rows”: [{“start_time”:”2017-05-05T22:26:22.000Z”,”end_time”:”2017-05-05T22:26:39.000Z”,”caller_id_name”:”Outbound Call”,”caller_id_number”:”6478505697″,”destination_number”:”19057609070″,”direction”:”inbound”,”minutes”:1,”charge”:0.01,”rate”:0.01},
{“start_time”:”2017-05-05T22:23:57.000Z”,”end_time”:”2017-05-05T22:24:12.000Z”,”caller_id_name”:”6478505697″,”caller_id_number”:”6478505697″,”destination_number”:”19057609070″,”direction”:”inbound”,”minutes”:1,”charge”:0.01,”rate”:0.01},
{“start_time”:”2017-05-05T22:22:43.000Z”,”end_time”:”2017-05-05T22:22:57.000Z”,”caller_id_name”:”6478505697″,”caller_id_number”:”6478505697″,”destination_number”:”19057609070″,”direction”:”inbound”,”minutes”:1,”charge”:0.01,”rate”:0.01},
{“start_time”:”2017-05-05T22:21:57.000Z”,”end_time”:”2017-05-05T22:22:15.000Z”,”caller_id_name”:”6478505697″,”caller_id_number”:”6478505697″,”destination_number”:”19057609070″,”direction”:”inbound”,”minutes”:1,”charge”:0.01,”rate”:0.01}]
}

成功响应

HTTP/1.1 200 OK
{
“totalRows”: 9,
“rows”: [{“start_time”:”2018-05-08T19:39:46.000Z”,”end_time”:”2018-05-08T19:40:10.000Z”,”caller_id_name”:”123456″,”caller_id_number”:”123456″,”destination_number”:”654321″,”direction”:”outbound”,”minutes”:1,”charge”:0,”rate”:0},
{“start_time”:”2018-05-08T19:36:22.000Z”,”end_time”:”2018-05-08T19:36:51.000Z”,”caller_id_name”:”123456″,”caller_id_number”:”123456″,”destination_number”:”654321″,”direction”:”outbound”,”minutes”:1,”charge”:0,”rate”:0},
{“start_time”:”2018-05-08T18:50:39.000Z”,”end_time”:”2018-05-08T18:50:47.000Z”,”caller_id_name”:”123456″,”caller_id_number”:”123456″,”destination_number”:”654321″,”direction”:”outbound”,”minutes”:1,”charge”:0,”rate”:0}]
}

通话记录 – 按UUID统计通话记录

按UUID获取通话记录

GET

/api/cdr/:date/:uuid

权限:通话记录

Header

字段类型描述
Content-Type字符串应用或JSON

参数

字段类型描述
date字符串日期格式为”YYYY-MM”
uuid字符串UUID

请求样例

/api/cdr/2017-05/387e3ea5-176d-450b-9970-567628a0cd5d

成功 200

字段类型描述
data对象通话记录实例
start_time字符串呼叫起始时间
end_time字符串呼叫结束时间
caller_id_name字符串主叫名称
caller_id_number字符串主叫号码
destination_number字符串通话记录被叫号码
direction字符串呼叫方向“呼入”或“呼出”
minutes数字呼叫时长(分钟)
charge数字呼叫费用
rate数字呼叫费率

成功响应

HTTP/1.1 200 OK
{
data: {
“start_time”:”2017-05-05T22:26:22.000Z”,
“end_time”:”2017-05-05T22:26:39.000Z”,
“caller_id_name”:”Outbound Call”,
“caller_id_number”:”6478505697″,
“destination_number”:”19057609070″,
“direction”:”inbound”,
“minutes”:1,
“charge”:0.01,
“rate”:0.01
}
}

错误 4XX

名称描述
CDRNotFound未找到该UUID的通话记录

错误响应

HTTP/1.1 400 Bad Request { “error”: “CDRNotFound” }

上一页 路由
下一页 鉴权
Table of Contents