业务统计
更新时间:2023-11-10
URL
/sms/v3/summary
HTTP Method
GET
请求Query参数
参数名称 | 类型 | 是否必需 | 描述 | 取值示例 |
---|---|---|---|---|
countryType | String | 否 | 统计选定的国家类型。适用国家类型 all:所有 domestic:国内 international:国际/港澳台 |
domestic |
countryCode | String | 否 | 2位国家编码。查询国家类型为国际/港澳台时,查询相应国家的统计信息 | US |
signatureId | String | 否 | 签名ID | sms-signQxkiwz88470 |
templateCode | String | 否 | 模板码,即模板ID | sms-tmpl-wHoJXL09355 |
queryType | String | 否 | 查询类型。默认普通查询,其他可选类型:template | - |
smsType | String | 是 | 短信类型。见api参考/短信类型 | CommonNotice |
dimension | String | 是 | 统计维度。适用的维度 fiveMinute hour day month |
day |
startTime | String | 是 | 查询开始时间。当统计维度为fiveMinute或hour时,查询开始时间不允许早于当天前;其他统计维度的查询开始时间不允许早于365天前 | 格式为yyyy-MM-dd HH:mm:ss(使用0时以保证统计结果的准确性),例如2013-10-01 00:00:00 |
endTime | String | 是 | 查询结束时间。当统计维度为day或month时,请使用以秒为精度的当天最晚时间以保证统计结果的准确性 | 格式为yyyy-MM-dd HH:mm:ss,例如2013-10-10 23:59:59 |
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
data | List | StatisticsResults 对象,是StatisticsResult数组 |
StatisticsResult定义
参数名称 | 类型 | 描述 |
---|---|---|
datetime | String | 该条统计结果的统计时间,根据统计维度决定输出格式。例如统计维度为day时,输出格式为yyyy-MM-dd,统计维度为month时,输出格式为yyyy-MM;每次响应还会返回一条值为“合计”的统计结果 |
userId | String | 用户百度云账号Id |
countryAlphaCode | String | 查询国际/港澳台短信统计结果时,查询国家对应的2位国家码 |
smsTypeId | String | 短信类型ID;值始终置空 |
signatureId | String | 签名ID;值始终置空 |
templateCode | String | 模板码/模板ID,唯一标识一个模板;仅在查询类型为“template”时有效 |
templateName | String | 模板名称,模板码对应的模板名称;仅在查询类型为“template”时有效 |
submitCount | String | 短信下发数量 |
submitLongCount | String | 长短信(完整短信)下发数量 |
deliverSuccessCount | String | 短信抵达成功数量;该字段不适用于国际/港澳台的统计查询 |
deliverSuccessLongCount | String | 长短信(完整短信)抵达成功数量;该字段不适用于国际/港澳台的统计查询 |
deliverFailureCount | String | 短信抵达失败数量;该字段不适用于国际/港澳台的统计查询 |
deliverSuccessProportion | String | 短信抵达成功比例;该字段不适用于国际/港澳台的统计查询 |
deliverFailureProportion | String | 短信抵达失败比例;该字段不适用于国际/港澳台的统计查询 |
responseSuccessCount | String | 短信响应成功数量 |
responseSuccessProportion | String | 短信响应成功比例 |
responseTimeoutCount | String | 短信响应超时数量 |
receiptProportion | String | 短信回执比例 |
unknownCount | String | 短信抵达情况未知数量 |
unknownProportion | String | 短信抵达情况未知比例 |
notExistCount | String | 失败原因数量统计:手机号不存在 |
signatureOrTemplateCount | String | 失败原因数量统计:签名或模板错误 |
abnormalCount | String | 失败原因数量统计:运营商网络错误 |
overclockingCount | String | 失败原因数量统计:网关下发超时 |
otherErrorCount | String | 失败原因数量统计:其他错误 |
blacklistCount | String | 失败原因数量统计:手机号在黑名单中 |
routeErrorCount | String | 失败原因数量统计:路由或通道错误 |
issueFailureCount | String | 失败原因数量统计:运营商下发错误 |
parameterErrorCount | String | 失败原因数量统计:参数错误 |
illegalWordCount | String | 失败原因数量统计:非法屏蔽词错误 |
anomalyCount | String | 失败原因数量统计:手机设备异常 |
unknownErrorCount | String | 失败原因未知数量 |
HTTP请求示例
JSON
1GET /sms/v3/summary?countryType=domestic&dimension=day&endTime=2023-10-30%2023%3A59%3A59&smsType=all&startTime=2023-10-30%2000%3A00%3A00 HTTP/1.1
2host: 127.0.0.1:8420
3authorization: bce-auth-v1/90360998a0a8423380894c9617fa951b/2023-10-31T03:42:33Z/1800/host;x-bce-date/7d0555ab7d4c59c755464b191ca7f5021c234bf07fe7ba8a6914a2654f9601be
4x-bce-date: 2023-10-31T03:42:33.440Z
5content-type: application/json; charset=utf-8
响应成功示例
JSON
1HTTP/1.1 200 OK
2x-bce-request-id: 00d0738e-9b37-499e-96db-00cc6a4b68c2
3Cache-Control: no-cache
4Server: BWS
5Connection: keep-alive
6Date: Mon, 31 Oct 2023 03:42:34 GMT
7Content-Type: application/json;charset=UTF-8
8
9{
10 "statisticsResults": [
11 {
12 "datetime": "合计",
13 "userId": "bbede3f8c42e4113b6971fd09a57f494",
14 "countryAlpha2Code": "",
15 "smsTypeId": "",
16 "signatureId": "",
17 "templateCode": "",
18 "templateName": "",
19 "submitLongCount": "10",
20 "submitCount": "100",
21 "deliverSuccessCount": "99",
22 "deliverSuccessLongCount": "10",
23 "deliverFailureCount": "1",
24 "unknownCount": "0",
25 "deliverSuccessProportion": "0.99",
26 "deliverFailureProportion": "0.01",
27 "notExistCount": "0",
28 "signatureOrTemplateCount": "0",
29 "abnormalCount": "0",
30 "overclockingCount": "0",
31 "otherErrorCount": "0",
32 "blacklistCount": "0",
33 "routeErrorCount": "0",
34 "issueFailureCount": "0",
35 "parameterErrorCount": "0",
36 "illegalWordCount": "0",
37 "anomalyCount": "1",
38 "unknownErrorCount": "0",
39 "receiptProportion": "1.0",
40 "unknownProportion": "0",
41 "responseSuccessCount": "100",
42 "responseTimeoutCount": "0",
43 "responseSuccessProportion": "1.0"
44 },
45 {
46 "datetime": "2023-10-30",
47 "userId": "bbede3f8c42e4113b6971fd09a57f494",
48 "countryAlpha2Code": "",
49 "smsTypeId": "",
50 "signatureId": "",
51 "templateCode": "",
52 "templateName": "",
53 "submitLongCount": "10",
54 "submitCount": "100",
55 "deliverSuccessCount": "99",
56 "deliverSuccessLongCount": "10",
57 "deliverFailureCount": "1",
58 "unknownCount": "0",
59 "deliverSuccessProportion": "0.99",
60 "deliverFailureProportion": "0.01",
61 "notExistCount": "0",
62 "signatureOrTemplateCount": "0",
63 "abnormalCount": "0",
64 "overclockingCount": "0",
65 "otherErrorCount": "0",
66 "blacklistCount": "0",
67 "routeErrorCount": "0",
68 "issueFailureCount": "0",
69 "parameterErrorCount": "0",
70 "illegalWordCount": "0",
71 "anomalyCount": "1",
72 "unknownErrorCount": "0",
73 "receiptProportion": "1.0",
74 "unknownProportion": "0",
75 "responseSuccessCount": "100",
76 "responseTimeoutCount": "0",
77 "responseSuccessProportion": "1.0"
78 },
79 ]
80}