tencent cloud

APIs

文档APIsTencent Push Notification ServiceStatistics APIsQuerying All Push Information in Specific Period

特定时间段所有推送信息查询

下载
聚焦模式
字号
最后更新时间: 2024-01-17 14:26:44

接口说明

请求方式: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
-
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
uint32
过期时间
单位 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 时有效 数据结构: { "op":"OR", //标签间逻辑操作 "tagWithType":[ { "tagTypeName":"xg_user_define", //标签类型 "tagValue":"test68" //标签值} ] }
uploadId
Intege
号码包 ID
pushType 为 package_account_push 时有效
pushConfig
Object
推送配置信息
"Android": Android 推送相关配置信息,具体参考下述代码
"iOS":iOS 推送相关配置信息, 具体参考下述代码

配置信息

Android 推送配置信息

"android": {
"ring": 1, //响铃
"vibrate": 1,//震动
"lights": 1,//呼吸灯
"clearable": 1, //是否可清除
"action": {
"action_type": 3,// 动作类型,1,打开activity或app本身;2,打开浏览器;3,打开Intent
"intent": "" //SDK版本需要大于等于1.0.9,然后在客户端的intent配置data标签,并设置scheme属性
},
"custom_content":"{}"
}

iOS 推送配置信息

"ios":{
"aps": {
"alert": {
"subtitle": "my subtitle"
},
"badge_type": 5, //App显示的角标数(可选) -2 自增,-1 不变,
"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": 126,
"pushRecordData": [
{
"date": "2019-11-18 11:26:54",
"pushId": "12",
"title": "测试标题",
"content": "测试日志",
"status": "PUSH_FINISHED",
"pushType": "all",
"targetList": null,
"tagSet": null,
"uploadId": 0,
"groupId": "",
"expireTime": 43200,
"messageType": "notify",
"xgMediaResources": "",
"environment": "product",
"pushConfig": {
"android": {
"n_id": 0,
"builder_id": 0,
"ring": 1,
"ring_raw": "",
"vibrate": 1,
"lights": 1,
"clearable": 1,
"icon_type": 0,
"icon_res": "",
"style_id": 0,
"small_icon": "",
"action": {
"action_type": 3,
"activity": "",
"aty_attr": null,
"browser": null,
"intent": ""
},
"custom_content": ""
},
"ios": null,
"iot": null
},
"multiPkg": true,
"source": "api"
}
]
}


帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈