接口说明
请求方式:POST
调用频率限制:200次/小时。
服务地址/v3/statistics/get_push_record
接口功能:查询特定时间段内所有任务的基本信息和设置。
参数说明
请求参数
参数名称 | 必选 | 类型 | 描述 |
startDate | 是 | String | 查询起始日期, 格式:YYYY-MM-DD 查询限制:当前日期1个月内 |
endDate | 是 | String | 查询截止日期,格式:YYYY-MM-DD |
msgType | 是 | String | 消息类型: notify:通知 message:静默消息 |
pushType | 是 | String | 推送类型: all:全推 tag:标签推 token:设备列表/设备单推 account:账号列表/账号单推 |
offset | 否 | Integer | 分页查询起始偏移 |
limit | 否 | Integer | 分页查询每页消息数 (最大限制为200) |
应答参数
参数名称 | 类型 | 描述 |
retCode | Integer | 返回状态码 |
errMsg | String | 错误信息 |
pushRecordData | Array | 返回结果,pushRecordData 结构变量见下表 |
count | Integer | 符合条件记录数 |
pushRecordData
参数名称 | 类型 | 说明 | 取值说明 |
date | String | 推送时间 | 格式:YYYY-MM-DD hh:mm:ss |
pushId | String | 消息 ID | - |
createTime | Integer | 创建时间 | 时间戳 |
title | String | 推送标题 | - |
content | String | 推送内容 | - |
status | String | 推送状态 | PUSH_INIT //任务已创建 PUSH_WAIT// 等待任务被调度 PUSH_STARTED// 推送中 PUSH_FINISHED// 推送完成 PUSH_FAILED//推送失败 PUSH_CANCELED// 用户取消推送 PUSH_DELETED// 推送被删除 PUSH_REVOKED//推送已被撤回 PUSH_COLLAPSED//推送已被覆盖 PUSH_DELETED_PUSH_MSG//推送被终止 |
pushType | String | 推送目标 | all:全推 tag:标签推送 token_list:设备列表 account_list:账号列表 package_account_push:号码包推送 |
messageType | String | 推送类型 | notify:通知 message:消息 |
environment | String | 推送环境 | product:生产环境 dev:开发环境 |
expireTime | Integer | 过期时间 | 单位 s |
xgMediaResources | String | 富媒体信息 | - |
xgMediaAudioResources | String | 富媒体资源 | - |
multiPkg | Boolean | 是否多包名推送 | true:开启多包名推送 false:关闭多包名推送 |
source | String | 推送来源 | api:REST API 创建 web:管理台创建 |
pushSpeed | Integer | 推送限速 | 取值参数范围1000 - 50000s |
targetList | Array(String) | 推送账号或推送设备列表 | pushType 为 token_list 或 account_list 时有效 |
collapseID | Integer | 消息覆盖 ID | pushType 为 all、tag、package_account_push 时有效 |
isCollapseMessage | Boolean | 是否为覆盖消息 | true:是 false:否 |
alreadySendNum | Integer | 已推送数 | - |
expectSendNum | Integer | 预计发送数 | - |
forceCollapse | Boolean | 是否强制覆盖 | true:是 false:否 |
channelRules | Array | 厂商通道规则 | |
loopRule | String | 循环推送规则 | - |
immediatePush | Boolean | 是否立即推送 | true:是 false:否 |
templateId | String | 模板ID | - |
traceId | String | 附带信息 | - |
templateTraceId | String | 模板附带信息 | - |
planId | String | 推送计划ID | - |
tpnsOnlinePushType | Integer | 在线设备是否通过移动推送自建通道下发: | 0 关闭在线推送通道, 1 在线推送 |
accountPushType | Integer | 推送账号类型,具体参考账号类型字段文档 | 0 :默认类型 1~16:用户自定义 更多参见 账号类型取值表 |
userGroupId | String | 用户分群ID | - |
uploadFileName | String | 批量推送文件名 | - |
testPush | Boolean | 是否为测试推送 | true:是 false:否 |
hwBizType | Integer | 是否开启华为快通知 | 1:开启 0:关闭 |
supplyInAppMsg | Boolean | 是否通过应用内补推 | true:是 false:否 说明: |
voip | Boolean | 是否VOIP推送 | true:是 false:否 |
channel_expires | Array[{"chanel":string,"expire_time":int}] | 厂商通道过期时间配置 | |
tagSet | Object | 标签设置 | pushType 为 tag 时有效 数据结构:
|
tagRule | Integer | 标签规则 | |
uploadId | Integer | 号码包 ID | pushType 为 package_account_push 时有效 |
pushConfig | Object | 推送配置信息 | "Android": Android 推送相关配置信息,具体参见 Android 推送配置信息代码 "iOS":iOS 推送相关配置信息, 具体参见 iOS 推送配置信息代码 |
groupId | String | 群组ID | - |
groupId | String | 推送分组ID | - |
source | String | 推送任务创建来源 | - |
配置信息
Android 推送配置信息
"android": {"ring": 1, //响铃"vibrate": 1,//震动"lights": 1,//呼吸灯"clearable": 1, //是否可清除"action": {"action_type": 3,// 动作类型,1,打开activity或app本身;2,打开浏览器;3,打开Intent"activity": "","intent": "" //SDK版本需要大于等于1.0.9,然后在客户端的intent配置data标签,并设置scheme属性},"custom_content":"{}","show_type": 0,"badge_type": -1,"badge_add_num": 0,"icon_color": 0,"xm_priority": -1,"hw_importance": 0,"hw_category": "","vivo_category": "","hw_biz_type": 0,"use_third_ex_cfg": false,"custom_layout_json_str": "","fcm_analytics_label": ""}
iOS 推送配置信息
"ios":{"aps": {"alert": {"subtitle": "my subtitle"},"badge_type": 5, //App显示的角标数(可选) -2 自增,-1 不变,"badge_add_num": 0,"category": "INVITE_CATEGORY","sound":"default", //缺省代表默认音效"mutable-content":1},
示例说明
请求示例
{"limit": 50,"startDate": "2019-07-01","endDate": "2019-08-01","msgType": "notify","pushType": "all","offset": 0}
应答示例
{"retCode": 0,"errMsg": "NO_ERROR","count": 1,"pushRecordData": [{"date": "2024-03-18 16:50:16","pushId": "835519560","createTime": 1710751816,"title": "test ","content": "test ","status": "PUSH_FINISHED","pushType": "all","targetList": null,"tagSet": null,"tagRule": null,"uploadId": 0,"groupId": "831799","expireTime": 86400,"messageType": "notify","xgMediaResources": "","xgMediaAudioResources": "","environment": "product","pushConfig": {"android": null,"ios": {"aps": {"alert": {"title": "te ","subtitle": "tde ","body": "dg ","sound": ""},"badge_type": -1,"badge_add_num": 0,"sound": "default","category": "","mutable-content": 1},"custom": "","custom_content": ""},"iot": null},"multiPkg": false,"source": "web","pushSpeed": 0,"collapseID": 35519560,"isCollapseMessage": false,"alreadySendNum": 0,"expectSendNum": 0,"forceCollapse": false,"channelRules": null,"loopRule": "","immediatePush": true,"templateId": "","traceId": "","templateTraceId": "","planId": "831799","tpnsOnlinePushType": 0,"accountPushType": 0,"userGroupId": "0","uploadFileName": "","testPush": false,"hwBizType": 0,"accountType": 0,"supplyInAppMsg": false,"voip": false,"channel_expires": null}]}