接口说明
请求方式:POST。
调用频率限制:200次/小时。
服务地址/v3/statistics/get_push_record
接口功能:根据任务的 pushid 查询该条任务的基本信息和设置。
参数说明
请求参数
参数名称 | 必选 | 类型 | 描述 |
pushId | 是 | String | 推送任务 ID |
应答参数
参数名称 | 类型 | 描述 |
retCode | Integer | 返回状态码 |
errMsg | String | 错误信息 |
pushRecordData | Array | 返回结果,pushRecordData 结构变量见下表 |
pushRecordData
参数名称 | 类型 | 说明 | 取值说明 |
date | String | 推送时间 | 格式:YYYY-MM-DD hh:mm:ss |
pushId | String | 消息ID | - |
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 | 富媒体信息 | - |
multiPkg | Boolean | 是否多包名推送 | true:开启多包名推送 false:关闭多包名推送 |
targetList | Array(String) | 推送账号或推送设备列表 | pushType 为 token_list 或 account_list 时有效 |
collapseID | Integer | 消息覆盖 ID | pushType 为 all、tag、package_account_push 时有效 |
tagSet | Object | 标签设置 | pushType 为 tag 时有效 数据结构:
|
uploadId | Integer | 号码包 ID | pushType 为 package_account_push 时有效 |
pushConfig | Object | 推送配置信息 | |
createTime | Uint32 | 创建时间 | 时间戳格式 |
tagRule | String | 标签规则 | 可参考文档了解 |
groupId | String | 推送分组ID | - |
xgMediaAudioResources | String | 富媒体资源 | - |
source | Integer | 推送来源 | api:REST API 创建 web:管理台创建 |
pushSpeed | Boolean | 推送限速 | 取值参数范围1000 - 50000
仅全量推送、号码包推送和标签推送有效 |
isCollapseMessage | Integer | 是否为覆盖消息 | true:是 false:否 |
alreadySendNum | Integer | 已推送数 | - |
expectSendNum | Boolean | 预计发送数 | - |
forceCollapse | Array | 是否强制覆盖 | true:是 false:否 |
channelRules | String | 厂商通道规则 | - |
loopRule | Boolean | 循环推送规则 | - |
immediatePush | String | 是否立即推送 | true:是 false:否 |
templateId | String | 模板ID | - |
traceId | String | 附带信息 | - |
templateTraceId | String | 模板附带信息 | - |
planId | Integer | 推送计划ID | - |
tpnsOnlinePushType | Integer | 在线设备是否通过移动推送自建通道下发: | 0 关闭在线推送通道, 1 在线推送 |
accountPushType | String | 推送账号类型,具体参考账号类型字段文档 | 0: 默认类型 1~16:用户自定义 具体参见 账号类型取值表。 |
userGroupId | String | 用户分群ID | - |
uploadFileName | Boolean | 批量推送文件名 | - |
testPush | Integer | 是否为测试推送 | true:是 false:否 |
hwBizType | Boolean | 是否开启华为快通知 | 1:开启 0:关闭 |
supplyInAppMsg | Boolean | 是否通过应用内补推 | true:是 false:否 说明: |
voip | Array[{"chanel":string,"expire_time":int}] | 是否VOIP推送 | true:是 false:否 |
channel_expires | | 厂商通道过期时间配置 | - |
配置信息
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},}
示例说明
请求示例
{"pushId": "133703"}
应答示例
{"retCode": 0,"errMsg": "NO_ERROR","pushRecordData": [{"date": "2024-03-18 11:22:49","pushId": 133703,"createTime": 1710732169,"title": "1","content": "2","status": "PUSH_FINISHED","pushType": "tag","targetList": null,"tagSet": {"op": "OR","tagWithType": [{"tagTypeName": "xg_user_define","tagValue": "test68"}]},"uploadId": 0,"groupId": "2676729","expireTime": 86400,"messageType": "notify","xgMediaResources": "","xgMediaAudioResources": "","environment": "product","collapseID": 0,"pushConfig": {"android": {"ring": 1,"vibrate": 0,"lights": 1,"clearable": 1,"action": {"action_type": 1,"activity": "","intent": ""},"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": null},"multiPkg": false,"source": "web","pushSpeed": 0,"collapseID": 35366737,"isCollapseMessage": false,"alreadySendNum": 1,"expectSendNum": 1,"forceCollapse": false,"channelRules": null,"loopRule": "","immediatePush": true,"templateId": "","traceId": "","templateTraceId": "","planId": "2676729","tpnsOnlinePushType": 0,"accountPushType": 0,"userGroupId": "0","uploadFileName": "","testPush": false,"hwBizType": 0,"accountType": 0,"supplyInAppMsg": false,"voip": false,"channel_expires": null}]}