统计 API
最近更新:2022-07-22
展开全部

统计 API

概述

JPush Report API V3 提供各类统计数据查询功能。

调用地址

https://report.jpush.cn/v3

调用验证

详情参见 REST API 概述的 鉴权方式 说明。

送达统计详情

Received API 以 msg_id 作为参数,去获取该 msg_id 的送达统计数据。
如果一次 API 调用推送有很多对象(比如广播推送),则此 API 返回的统计数据会因为持续有客户端送达而持续增加。

此接口会根据消息是通过极光自有通道下发、Android厂商通道下发进行数据统计区分,建议尽早切换使用此接口。

每条推送消息的送达统计数据最多保留一个月。即发起推送请求后从最后一个推送送达记录时间点开始保留一个月,如果保留期间有新的送达,将在这个新送达的时间点起再往后保留一个月。

调用地址

GET /v3/received/detail

请求示例

curl -v https://report.jpush.cn/v3/received/detail?msg_ids=1613113584,1229760629 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" < GET /v3/received/detail?msg_ids=1613113584,1229760629 HTTP/1.1 < Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          curl -v https://report.jpush.cn/v3/received/detail?msg_ids=1613113584,1229760629 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"

< GET /v3/received/detail?msg_ids=1613113584,1229760629 HTTP/1.1
< Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
此代码块在浮窗中显示

请求参数

  • msg_ids 推送 API 返回的 msg_id 列表,多个 msg_id 用逗号隔开,最多支持 100 个 msg_id。

返回示例

< HTTP/1.1 200 OK < Content-Type: application/json < [ {"msg_id":"1613113584", "jpush_received":62, "android_pns_sent":12, "android_pns_received":12, "ios_apns_sent":11, "ios_apns_received":5, "ios_msg_received": 3, "wp_mpns_sent" : 3, "quickapp_jpush_received": 1, "quickapp_pns_sent": 1}, {"msg_id":"1229760629", "jpush_received":56, "android_pns_sent":12, "android_pns_received":12, "ios_apns_sent":33, "ios_apns_received":17, "ios_msg_received": 3, "wp_mpns_sent" : null, "quickapp_jpush_received": 1, "quickapp_pns_sent": 1} ]
          < HTTP/1.1 200 OK 
< Content-Type: application/json
<
[
   {"msg_id":"1613113584",
    "jpush_received":62,
    "android_pns_sent":12,
    "android_pns_received":12, 
    "ios_apns_sent":11,
    "ios_apns_received":5,
    "ios_msg_received": 3,
    "wp_mpns_sent" : 3,
    "quickapp_jpush_received": 1,
    "quickapp_pns_sent": 1},

   {"msg_id":"1229760629",
    "jpush_received":56,
    "android_pns_sent":12,
    "android_pns_received":12,
    "ios_apns_sent":33,
    "ios_apns_received":17,
    "ios_msg_received": 3, 
    "wp_mpns_sent" : null,
    "quickapp_jpush_received": 1,
    "quickapp_pns_sent": 1}
]

        
此代码块在浮窗中显示

返回参数

JSON Array.

  • jpush_received 极光通道用户送达数;包含普通Android用户的通知+自定义消息送达,iOS用户自定义消息送达;如果无此项数据则为 null。
  • android_pns_sent Android厂商用户推送到厂商服务器成功数,计算方式同 Android厂商成功数;如果无此项数据则为 null。
  • android_pns_received Android厂商用户推送达到设备数,计算方式以厂商回调数据为准;如果无此项数据则为 null。20200324新增指标
  • ios_apns_sent iOS 通知推送到 APNs 成功。如果无此项数据则为 null。
  • ios_apns_received iOS 通知送达到设备并成功展示。如果无项数据则为 null。统计该项请参考 集成指南高级功能-通知展示统计
  • ios_msg_received iOS 自定义消息送达数。如果无此项数据则为 null。
  • wp_mpns_sent winphone通知送达。如果无此项数据则为 null。
  • quickapp_jpush_received 快应用推送走极光通道送达设备成功的用户数量。
  • quickapp_pns_sent 快应用推送走厂商通道请求成功的用户数量。

送达统计(旧)

Received API 以 msg_id 作为参数,去获取该 msg_id 的送达统计数据。
如果一次 API 调用推送有很多对象(比如广播推送),则此 API 返回的统计数据会因为持续有客户端送达而持续增加。

此接口后期不再维护,建议尽快切换到“送达统计详情”新接口。

每条推送消息的送达统计数据最多保留一个月。即发起推送请求后从最后一个推送送达记录时间点开始保留一个月,如果保留期间有新的送达,将在这个新送达的时间点起再往后保留一个月。

调用地址

GET /received

请求示例

curl -v https://report.jpush.cn/v3/received?msg_ids=1613113584,1229760629 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" < GET /v3/received?msg_ids=1613113584,1229760629 HTTP/1.1 < Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          curl -v https://report.jpush.cn/v3/received?msg_ids=1613113584,1229760629 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"

< GET /v3/received?msg_ids=1613113584,1229760629 HTTP/1.1
< Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
此代码块在浮窗中显示

请求参数

  • msg_ids 推送 API 返回的 msg_id 列表,多个 msg_id 用逗号隔开,最多支持 100 个 msg_id。

返回示例

< HTTP/1.1 200 OK < Content-Type: application/json < [ {"msg_id":"1613113584", "android_received":62, "ios_apns_sent":11, "ios_apns_received":5, "ios_msg_received": 3, "wp_mpns_sent" : 3}, {"msg_id":"1229760629", "android_received":56, "ios_apns_sent":33, "ios_apns_received":17, "ios_msg_received": 3, "wp_mpns_sent" : null} ]
          < HTTP/1.1 200 OK 
< Content-Type: application/json
< 
[  {"msg_id":"1613113584",
    "android_received":62,
    "ios_apns_sent":11,
    "ios_apns_received":5,
    "ios_msg_received": 3, 
    "wp_mpns_sent" : 3},

   {"msg_id":"1229760629",
    "android_received":56,
    "ios_apns_sent":33,
    "ios_apns_received":17,
    "ios_msg_received": 3,  
    "wp_mpns_sent" : null}
]

        
此代码块在浮窗中显示

返回参数

JSON Array.

  • android_received Android 送达。如果无此项数据则为 null。
  • ios_apns_sent iOS 通知推送到 APNs 成功。如果无此项数据则为 null。
  • ios_apns_received iOS 通知送达到设备并成功展示。如果无项数据则为 null。统计该项请参考 集成指南高级功能-通知展示统计
  • ios_msg_received iOS 自定义消息送达数。如果无此项数据则为 null。
  • wp_mpns_sent winphone通知送达。如果无此项数据则为 null。

送达状态查询(VIP)

此 API 用于查询已推送的一条消息在一组设备上的送达状态。建议仅作为排查工具使用,如需更实时的用户送达/未送达情况,可使用“送达/未送达”回执高级功能,具体请 联系商务

调用地址

POST /status/message

请求示例

curl --insecure -X POST -v https://report.jpush.cn/v3/status/message -H "Content-Type: application/json" -u "29ea851419f747be7b5785a0:79f486970ec5c41bfe381bc3" -d '{ "msg_id": 327640176, "registration_ids":["1506bfd3a7c568d4761", "02078f0f1b8", "0207870a9b8"]}' > POST /v3/status/message HTTP/1.1 > Host: report.jpush.cn > Authorization: Basic MjllYTg1MTQxOWY3NDdiZTdiNTc4NWEwOjc5ZjQ4Njk3MGVjNMM0MWJmZTM4MWJjMw==
          curl --insecure -X POST -v https://report.jpush.cn/v3/status/message -H "Content-Type: application/json" -u "29ea851419f747be7b5785a0:79f486970ec5c41bfe381bc3" -d '{ "msg_id": 327640176, "registration_ids":["1506bfd3a7c568d4761", "02078f0f1b8", "0207870a9b8"]}'

> POST /v3/status/message HTTP/1.1
> Host: report.jpush.cn
> Authorization: Basic MjllYTg1MTQxOWY3NDdiZTdiNTc4NWEwOjc5ZjQ4Njk3MGVjNMM0MWJmZTM4MWJjMw==

        
此代码块在浮窗中显示

请求参数

JSON Object

  • msg_id 必传。消息 id,一次调用仅支持一个消息 id 查询。
  • registration_ids 必传。JSON Array 类型,多个registration id 用逗号隔开,一次调用最多支持 1000个。
  • date 可选。查询的指定日期,格式为 yyyy-mm-dd,默认为当天。

返回示例

成功返回

HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8
          HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

        
此代码块在浮窗中显示

返回数据

{ "02078f0f1b8": { "status": 2 }, "1507bfd3a7c568d4761": { "status": 0 }, "0207870a9b8": { "status": 2 } }
          {
    "02078f0f1b8": {
        "status": 2
    },
    "1507bfd3a7c568d4761": {
        "status": 0
    },
    "0207870a9b8": {
        "status": 2
    }
}

        
此代码块在浮窗中显示

status 含义:

  • 0: 送达;
  • 1: 未送达;
  • 2: registration_id 不属于该应用;
  • 3: registration_id 属于该应用,但不是该条 message 的推送目标;
  • 4: 系统异常。

消息统计详情(VIP-新)

与“送达统计” API 不同的是,该 API 提供更多的针对一个 msgid 的统计数据。

与“消息统计” 旧接口相比,此接口获取到的数据更详细,建议尽快切换使用此接口。

如需要开通此接口,请联系:商务客服

调用地址

GET /messages/detail

请求示例

curl -v https://report.jpush.cn/v3/messages/detail?msg_ids=269978303 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" > GET /v3/messages/detail?msg_ids=269978303 HTTP/1.1 > Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          curl -v https://report.jpush.cn/v3/messages/detail?msg_ids=269978303 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"

> GET /v3/messages/detail?msg_ids=269978303 HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
此代码块在浮窗中显示

请求参数

  • msg_ids 多个 msg_id 用逗号隔开,最多支持 100 个 msg_id。

返回示例

< HTTP/1.1 200 OK < Content-Type: application/json < [ { "msg_id": "123456789", "details": {//2021.09.01新体系指标 "notification": {//通知栏消息汇总统计数据 "target": 1600, "sent": 1440, "received": 1280, "display": 1120, "click": 0, "sub_android": { //android平台各个通道统计数据 "jg_android": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "huawei": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "xiaomi": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "oppo": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "vivo": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "meizu": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "fcm": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "asus": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "tuibida": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "honor": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } }, "sub_ios": { "voip": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "apns": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } }, "sub_quickapp": { "quick_jg": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "quick_huawei": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "quick_xiaomi": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "quick_oppo": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } } }, "message": {//自定义消息汇总统计数据 "target": 700, "sent": 630, "received": 560, "display": 490, "click": 0, "sub_android": {//android平台各个通道统计数据 "jg_android": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "huawei": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "xiaomi": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "fcm": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 }, "honor": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } }, "sub_ios": {//ios平台统计数据 "jg_ios": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } }, "sub_quickapp": {//qicukApp平台各个通道统计数据 "quick_jg": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } } }, "inapp": {//应用内提醒消息汇总统计数据 "target": 200, "sent": 180, "received": 160, "display": 140, "click": 0, "sub_android": {//android平台各个通道统计数据 "jg_android": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } }, "sub_ios": {//ios平台各个通道统计数据 "jg_ios": { "target": 100, "sent": 90, "received": 80, "display": 70, "click": 0 } } } }, //2021.09.01 前旧体系指标 "jpush": { "target": 100, "online_push": 90,// 该字段2021.09.01失效 "received": 80, "display": 70,// 20210817 新增展示数 "click": 0, "msg_click": 0 }, "android_pns": { "pns_target": 800, "pns_sent": 720, "pns_received": 640, "pns_display": 560,// 20210817 新增展示数 "xm_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "hw_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "mz_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "oppo_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "vivo_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "fcm_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "asus_detail": { "target": 100, "sent": 90, "received": 80, "display": 70 // 20210817 新增展示数 }, "honor_detail": {// 20220620 新增 "target": 100, "sent": 90, "received": 80, "display": 70 } }, "ios": { "apns_target": 100, "apns_sent": 90, "apns_received": 80, "apns_click": 70, "apns_display": 60,// 20210817 新增展示数 "msg_target": 100, "msg_received": 90, "msg_click": 90, "msg_display": 90// 20210817 新增展示数 }, "winphone": { "mpns_target": 0, "mpns_sent": 0, "click": 0 }, "quickapp_jpush": {// 快应用推送走极光通道下发的统计指标:目标数、在线数、送达数、点击数、自定义点击数 "target": 100, "online_push": 0,// 该字段2021.09.01失效 "received": 80, "click": 0, "msg_click": 0 }, "quickapp_pns": {// 快应用推送走厂商通道下发的统计指标:目标数、成功数 "pns_target": 0, "pns_sent": 0 } } ]
          < HTTP/1.1 200 OK
< Content-Type: application/json
<
[
    {
        "msg_id": "123456789",
        "details": {//2021.09.01新体系指标
            "notification": {//通知栏消息汇总统计数据
                "target": 1600,
                "sent": 1440,
                "received": 1280,
                "display": 1120,
                "click": 0,
                "sub_android": { //android平台各个通道统计数据
                    "jg_android": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "huawei": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "xiaomi": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "oppo": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "vivo": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "meizu": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "fcm": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "asus": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "tuibida": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "honor": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                },
                "sub_ios": {
                    "voip": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "apns": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                },
                "sub_quickapp": {
                    "quick_jg": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "quick_huawei": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "quick_xiaomi": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "quick_oppo": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                }
            },
            "message": {//自定义消息汇总统计数据
                "target": 700,
                "sent": 630,
                "received": 560,
                "display": 490,
                "click": 0,
                "sub_android": {//android平台各个通道统计数据
                    "jg_android": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "huawei": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "xiaomi": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "fcm": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    },
                    "honor": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                },
                "sub_ios": {//ios平台统计数据
                    "jg_ios": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                },
                "sub_quickapp": {//qicukApp平台各个通道统计数据
                    "quick_jg": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                }
            },
            "inapp": {//应用内提醒消息汇总统计数据
                "target": 200,
                "sent": 180,
                "received": 160,
                "display": 140,
                "click": 0,
                "sub_android": {//android平台各个通道统计数据
                    "jg_android": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                },
                "sub_ios": {//ios平台各个通道统计数据
                    "jg_ios": {
                        "target": 100,
                        "sent": 90,
                        "received": 80,
                        "display": 70,
                        "click": 0
                    }
                }
            }
        },

//2021.09.01 前旧体系指标
        "jpush": {
            "target": 100,
            "online_push": 90,// 该字段2021.09.01失效
            "received": 80,
            "display": 70,// 20210817 新增展示数
            "click": 0,
            "msg_click": 0
        },
        "android_pns": {
            "pns_target": 800,
            "pns_sent": 720,
            "pns_received": 640,
            "pns_display": 560,// 20210817 新增展示数
            "xm_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "hw_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "mz_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "oppo_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "vivo_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "fcm_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "asus_detail": {
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 // 20210817 新增展示数
            },
            "honor_detail": {// 20220620 新增
                "target": 100,
                "sent": 90,
                "received": 80,
                "display": 70 
            }
        },
        "ios": {
            "apns_target": 100,
            "apns_sent": 90,
            "apns_received": 80,
            "apns_click": 70,
            "apns_display": 60,// 20210817 新增展示数
            "msg_target": 100,
            "msg_received": 90,
            "msg_click": 90,
            "msg_display": 90// 20210817 新增展示数
        },
        "winphone": {
            "mpns_target": 0,
            "mpns_sent": 0,
            "click": 0
        },
        "quickapp_jpush": {// 快应用推送走极光通道下发的统计指标:目标数、在线数、送达数、点击数、自定义点击数
            "target": 100,
            "online_push": 0,// 该字段2021.09.01失效
            "received": 80,
            "click": 0,
            "msg_click": 0
        },
        "quickapp_pns": {// 快应用推送走厂商通道下发的统计指标:目标数、成功数
            "pns_target": 0,
            "pns_sent": 0
        }
    }
]

        
此代码块在浮窗中显示

返回示例定义说明

2021.09.01新体系指标

  • msg_id 查询的消息 ID
  • details 同一条消息在可能包含通知栏消息、自定义消息和应用提醒消息等不同类型
    • notification:通知栏消息类型的数据汇总统计
    • message:自定义消息的数据汇总统计
    • inapp:应用内提醒消息的数据汇总统计
      • sub:对不同类型的消息,按平台按发送通道汇总统计
    • 消息生命周期状态定义
      • target:有效目标,将推送任务所选定的目标人群,经过有效性筛选后的目标设备数量
      • sent:发送数量,有效目标设备中,极光服务器实际成功创建了发送任务的设备数量
      • received:送达数量,通知消息发送后,实际送达至设备终端的数量,5天之后的送达数量不被计算在内,华为、荣耀、魅族和ios需要配置回调送达数据才更加精准
      • display:展示数量,通知消息送达后,实际在设备终端成功展示的数量,5天之后的展示数量不被计算在内
      • click:点击数量,通知消息成功展示后,实际被用户点击的数量,5天之后的点击数量不被计算在内。

2021.09.01前旧体系指标

  • jpush 极光通道统计数据,走极光通道下发的普通Android用户通知/自定义消息 以及 iOS用户自定义消息总体情况

    • target 有效目标
    • sent 发送数量
    • received 送达数量
    • display 展示数量
    • click 通知栏消息点击数量
    • msg_click 自定义消息点击数量
  • android_pns Android厂商通道统计数据,走厂商通道下发统计数据

    • pns_target 通过厂商通道推送目标数

    • pns_sent 推送到厂商通道成功数

    • pns_received 厂商推送送达设备数,20200324新增指标

    • pns_display 展示数

    • xm_detail 推送到小米通道详情

      • target 小米用户目标数
      • sent 推送到小米平台成功数
      • received 小米通道送达设备数,20200324新增指标
      • display 展示数
    • hw_detail 推送到华为通道详情

      • target 华为用户目标数
      • sent 推送到华为平台成功数
      • received 华为通道送达设备数,20200324新增指标
      • display 展示数
    • honor_detail 推送到荣耀通道详情,20220620新增指标

      • target 荣耀用户目标数
      • sent 推送到荣耀平台成功数
      • received 荣耀通道送达设备数
      • display 展示数
    • mz_detail 推送到魅族通道详情

      • target 魅族用户目标数
      • sent 推送到魅族平台成功数
      • received 魅族通道送达设备数,20200324新增指标
      • display 展示数
    • oppo_detail 推送到OPPO通道详情

      • target OPPO用户目标数
      • sent 推送到OPPO平台成功数
      • received OPPO通道送达设备数,20200324新增指标
      • display 展示数
    • vivo_detail 推送都VIVO通道详情

      • target VIVO用户目标数
      • sent 推送到VIVO平台成功数
      • received VIVO通道送达设备数,20200324新增指标
      • display 展示数
    • fcm_detail 推送到FCM通道详情

      • target FCM用户目标数
      • sent 推送到FCM平台成功数
      • received FCM通道送达设备数,20200324新增指标
      • display 展示数
  • ios iOS 统计数据

    • apns_target APNs 通知推送目标数
    • apns_sent APNs 通知成功推送数,发送到APNs服务器成功
    • apns_received APNs 通知展示数,APNs 服务器下发到设备并成功展示,统计该项请参考 集成指南高级功能-通知展示统计
    • apns_display 展示数
    • apns_click 通知点击数
    • msg_target 自定义消息目标数
    • msg_received 自定义消息送达数
    • msg_click 自定义消息点击数
    • msg_display 展示数
  • winphone Winphone 统计数据

    • mpns_target MPNs 通知推送目标数
    • mpns_sent MPNS 通知成功推送数
    • click MPNs 通知用户点击数
  • quickapp_jpush QuickApp 统计数据

    • target 推送目标数
    • online_push 在线推送数
    • received 推送送达数
    • click 用户点击数
    • msg_click 自定义消息点击数
  • quickapp_pns QuickApp 统计数据

    • pns_target 通过厂商通道推送目标数
    • pns_sent 推送到厂商通道成功数

消息统计(VIP-旧)

与“送达统计” API 不同的是,该 API 提供更多的针对一个 msgid 的统计数据。

此接口后期不再维护,建议尽快切换到“消息统计详情”新接口。

调用地址

GET /messages

请求示例

curl -v https://report.jpush.cn/v3/messages?msg_ids=269978303 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1" > GET /v3/messages?msg_ids=269978303 HTTP/1.1 > Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==
          curl -v https://report.jpush.cn/v3/messages?msg_ids=269978303 -u "7d431e42dfa6a6d693ac2d04:5e987ac6d2e04d95a9d8f0d1"

> GET /v3/messages?msg_ids=269978303 HTTP/1.1
> Authorization: Basic N2Q0MzFlNDJkZmE2YTZkNjkzYWMyZDA0OjVlOTg3YWM2ZDJlMDRkOTVhOWQ4ZjBkMQ==

        
此代码块在浮窗中显示

请求参数

  • msg_ids 多个 msg_id 用逗号隔开,最多支持 100 个 msg_id。

返回示例

< HTTP/1.1 200 OK < Content-Type: application/json < [ { "android": {"received":1,"target":4,"online_push":1,"click":null,"msg_click":null}, "ios": {"apns_sent":2,"apns_target":2,"apns_received":1,"click":null,"target":10,"received":8,"msg_click": 50}, "winphone": {"mpns_target": 100,"mpns_sent": 100,"click": 100,}, "msg_id":"269978303" } ]
          < HTTP/1.1 200 OK
< Content-Type: application/json
<
[
  {
   "android":
      {"received":1,"target":4,"online_push":1,"click":null,"msg_click":null},

   "ios":
      {"apns_sent":2,"apns_target":2,"apns_received":1,"click":null,"target":10,"received":8,"msg_click": 50},

   "winphone":
      {"mpns_target": 100,"mpns_sent": 100,"click": 100,},

   "msg_id":"269978303"
  }
]

        
此代码块在浮窗中显示

返回参数

JSON Array

  • msg_id 查询的消息 ID

  • android Android 统计数据

    • target 推送目标数
    • online_push 在线推送数
    • received 推送送达数
    • click 用户点击数
    • msg_click 自定义消息点击数
  • ios iOS 统计数据

    • apns_target APNs通知推送目标数
    • apns_sent APNS通知推送成功数
    • apns_received APNs 通知展示数 ,统计该项请参考 集成指南高级功能-通知展示统计
    • click 用户点击数
    • target 自定义消息目标数
    • received 自定义消息送达数
    • msg_click 自定义消息点击数
  • winphone Winphone 统计数据

    • mpns_target MPNs 通知推送目标数
    • mpns_sent MPNS 通知成功推送数
    • click 用户点击数

用户统计(VIP)

提供近 2 个月内某时间段的用户相关统计数据:新增用户、在线用户、活跃用户。
时间单位支持:HOUR(小时)、DAY(天)、MONTH(月)。

如需要开通此接口,请联系:商务客服

调用地址

GET /users

请求示例

curl -v "https://report.jpush.cn/v3/users?time_unit=DAY&start=2014-06-10&duration=3" -u "dd1066407b044738b6479275:2b38ce69b1de2a7fa95706ea" > GET /v3/users?time_unit=DAY&start=2014-06-10&duration=3 HTTP/1.1 > Authorization: Basic ZGQxMDY2NDA3YjA0NDczOGI2NDc5Mjc1OjJiMzhjZTY5YjFkZTJhN2ZhOTU3MDZlYQ==
          curl -v "https://report.jpush.cn/v3/users?time_unit=DAY&start=2014-06-10&duration=3" -u "dd1066407b044738b6479275:2b38ce69b1de2a7fa95706ea"

> GET /v3/users?time_unit=DAY&start=2014-06-10&duration=3 HTTP/1.1
> Authorization: Basic ZGQxMDY2NDA3YjA0NDczOGI2NDc5Mjc1OjJiMzhjZTY5YjFkZTJhN2ZhOTU3MDZlYQ==

        
此代码块在浮窗中显示

请求参数

  • time_unit 时间单位。有三个取值:
    • HOUR 小时
    • DAY 天
    • MONTH 月
  • start 起始时间。
    • 如果单位是小时,则起始时间是小时(包含天),格式例:2014-06-11 09
    • 如果单位是天,则起始时间是日期(天),格式例:2014-06-11
    • 如果单位是月,则起始时间是日期(月),格式例:2014-06
  • duration 持续时长。
    • 如果单位是天,则是持续的天数。以此类推。
    • 只支持查询 60 天以内的用户信息,对于 time_unit 为 HOUR 的,只支持输出当天的统计结果。

返回示例

< HTTP/1.1 200 OK < {"time_unit":"DAY","start":"2014-06-10","duration":3,"items":[{"time":"2014-06-10"},{"time":"2014-06-11","android":{"active":1}},{"time":"2014-06-12","android":{"active":1,"online":2}}]}
          < HTTP/1.1 200 OK
<
{"time_unit":"DAY","start":"2014-06-10","duration":3,"items":[{"time":"2014-06-10"},{"time":"2014-06-11","android":{"active":1}},{"time":"2014-06-12","android":{"active":1,"online":2}}]}

        
此代码块在浮窗中显示

返回参数

JSON Object

  • time_unit 请求时的时间单位。

  • start 请求时的起始时间。

  • duration 请求时的持续时长。

  • items 获取到的统计数据项。是一个 JSON Array。

    + new 新增用户 + online 在线用户 + active 活跃用户
                + new 新增用户
      + online 在线用户
      + active 活跃用户
    
            
    此代码块在浮窗中显示

分组统计-消息统计(VIP)

与“消息统计详情(VIP 专属接口,新)” API 不同的是,该 API 主要根据 group_msgids ,针对分组推送提供直接的数据统计结果。

如需要开通此接口,请联系:商务客服

注: 此接口鉴权使用的是 base64(groupkey:group_secret)

groupkey 可以在创建的分组信息中获取,使用起来同 appkey 类似,但在使用的时候前面要加上 “group-” 前缀,group_secret 对应分组信息中的 Group Master Secret。

调用地址

GET /group/messages/detail

请求示例

curl --insecure -X GET -v "https://report.jpush.cn/v3/group/messages/detail?group_msgids=bsp54sn8bpn8hc3etq40" -H "Content-Type: application/json" -u "group-9439ee12e91bd4c895d1b0f5:01bad4e44cecb42b36ea370a"
          curl --insecure -X GET -v "https://report.jpush.cn/v3/group/messages/detail?group_msgids=bsp54sn8bpn8hc3etq40" -H "Content-Type: application/json" -u "group-9439ee12e91bd4c895d1b0f5:01bad4e44cecb42b36ea370a"

        
此代码块在浮窗中显示

请求参数

  • group_msgids 分组推送的唯一标识,多个 group_msgids 用英文逗号隔开,最多支持 10 个 group_msgids。
  • 只支持查询 30 天以内的推送信息。

返回示例

< HTTP/2 200 < server: nginx < date: Tue, 11 Aug 2020 08:35:38 GMT < content-type: application/json [{"android_pns":{"fcm_detail":{"received":0,"sent":0,"target":0},"hw_detail":{"received":0,"sent":0,"target":0},"honor_detail":{"received":0,"sent":0,"target":0},"mz_detail":{"received":0,"sent":0,"target":0},"oppo_detail":{"received":0,"sent":0,"target":0},"pns_received":1,"pns_sent":1,"pns_target":1,"vivo_detail":{"received":0,"sent":0,"target":0},"xm_detail":{"received":1,"sent":1,"target":1}},"group_msgid":"bsp54sn8bpn8hc3etq40","ios":{"apns_click":0,"apns_received":0,"apns_sent":0,"apns_target":0,"msg_click":0,"msg_received":0,"msg_target":0},"jpush":{"click":0,"msg_click":0,"online_push":2,"received":2,"target":14},"winphone":{"click":0,"mpns_sent":0,"mpns_target":0}}]
          < HTTP/2 200 
< server: nginx
< date: Tue, 11 Aug 2020 08:35:38 GMT
< content-type: application/json
[{"android_pns":{"fcm_detail":{"received":0,"sent":0,"target":0},"hw_detail":{"received":0,"sent":0,"target":0},"honor_detail":{"received":0,"sent":0,"target":0},"mz_detail":{"received":0,"sent":0,"target":0},"oppo_detail":{"received":0,"sent":0,"target":0},"pns_received":1,"pns_sent":1,"pns_target":1,"vivo_detail":{"received":0,"sent":0,"target":0},"xm_detail":{"received":1,"sent":1,"target":1}},"group_msgid":"bsp54sn8bpn8hc3etq40","ios":{"apns_click":0,"apns_received":0,"apns_sent":0,"apns_target":0,"msg_click":0,"msg_received":0,"msg_target":0},"jpush":{"click":0,"msg_click":0,"online_push":2,"received":2,"target":14},"winphone":{"click":0,"mpns_sent":0,"mpns_target":0}}]

        
此代码块在浮窗中显示

返回参数

JSON Array

  • group_msgids 查询的分组推送消息 ID
  • jpush 极光通道统计数据,走极光通道下发的普通Android用户通知/自定义消息 以及 iOS用户自定义消息总体情况
    • target 推送目标数
    • online_push 在线推送数
    • received 推送送达数
    • click 用户点击数
    • msg_click 自定义消息点击数
  • android_pns Android厂商通道统计数据,走厂商通道下发统计数据
    • pns_target 通过厂商通道推送目标数
    • pns_sent 推送到厂商通道成功数
    • pns_received 厂商推送送达设备数
    • xm_detail 推送到小米通道详情
      • target 小米用户目标数
      • sent 推送到小米平台成功数
      • received 小米通道送达设备数
    • hw_detail 推送到华为通道详情
      • target 华为用户目标数
      • sent 推送到华为平台成功数
      • received 华为通道送达设备数
    • honor_detail 推送到荣耀通道详情
      • target 荣耀用户目标数
      • sent 推送到荣耀平台成功数
      • received 荣耀通道送达设备数
    • mz_detail 推送到魅族通道详情
      • target 魅族用户目标数
      • sent 推送到魅族平台成功数
      • received 魅族通道送达设备数
    • oppo_detail 推送到OPPO通道详情
      • target OPPO用户目标数
      • sent 推送到OPPO平台成功数
      • received OPPO通道送达设备数
    • vivo_detail 推送都VIVO通道详情
      • target VIVO用户目标数
      • sent 推送到VIVO平台成功数
      • received VIVO通道送达设备数
    • fcm_detail 推送到FCM通道详情
      • target FCM用户目标数
      • sent 推送到FCM平台成功数
      • received FCM通道送达设备数
  • ios iOS 统计数据
    • apns_target APNs 通知推送目标数
    • apns_sent APNs 通知成功推送数,发送到APNs服务器成功
    • apns_received APNs 通知展示数,APNs 服务器下发到设备并成功展示,统计该项请参考 集成指南高级功能-通知展示统计
    • apns_click 通知点击数
    • msg_target 自定义消息目标数
    • msg_received 自定义消息送达数
    • msg_click 自定义消息点击数
  • winphone Winphone 统计数据
    • mpns_target MPNs 通知推送目标数
    • mpns_sent MPNS 通知成功推送数
    • click MPNs 通知用户点击数

分组统计-用户统计(VIP)

针对分组应用,提供近 1 个月内某时间段的用户相关统计数据:新增用户、在线用户、活跃用户。
时间单位支持:HOUR(小时)、DAY(天)、MONTH(月)。

如需要开通此接口,请联系:商务客服

注: 此接口鉴权使用的是 base64(groupkey:group_secret)

groupkey 可以在创建的分组信息中获取,使用起来同 appkey 类似,但在使用的时候前面要加上 “group-” 前缀,group_secret 对应分组信息中的 Group Master Secret。

调用地址

GET /group/users

请求示例

curl -v "https://report.jpush.cn/v3/group/users?time_unit=day&start=2020-08-06&duration=2" -u "group-9439ee12e91bd4c895d1b0f5:01bad4e44cecb42b36ea370a"
          curl -v "https://report.jpush.cn/v3/group/users?time_unit=day&start=2020-08-06&duration=2" -u "group-9439ee12e91bd4c895d1b0f5:01bad4e44cecb42b36ea370a"

        
此代码块在浮窗中显示

请求参数

  • time_unit 时间单位。有三个取值:
    • HOUR 小时
    • DAY 天
    • MONTH 月
  • start 起始时间。
    • 如果单位是小时,则起始时间是小时(包含天),格式例:2020-08-11 09
    • 如果单位是天,则起始时间是日期(天),格式例:2020-08-11
    • 如果单位是月,则起始时间是日期(月),格式例:2020-08
  • duration 持续时长。
    • 如果单位是天,则是持续的天数。以此类推。
    • 只支持查询 30 天以内的用户信息,对于 time_unit 为 HOUR 的,只支持输出当天的统计结果。

返回示例

< HTTP/2 200 < server: nginx < date: Tue, 11 Aug 2020 08:26:53 GMT < content-type: application/json {"duration":2,"items":[{"android":{"active":7,"new":5,"online":11},"time":"2020-08-06"},{"android":{"active":6,"new":2,"online":8},"time":"2020-08-07"}],"start":"2020-08-06","time_unit":"day"}
          < HTTP/2 200 
< server: nginx
< date: Tue, 11 Aug 2020 08:26:53 GMT
< content-type: application/json
{"duration":2,"items":[{"android":{"active":7,"new":5,"online":11},"time":"2020-08-06"},{"android":{"active":6,"new":2,"online":8},"time":"2020-08-07"}],"start":"2020-08-06","time_unit":"day"}

        
此代码块在浮窗中显示

返回参数

JSON Object

  • time_unit 请求时的时间单位。

  • start 请求时的起始时间。

  • duration 请求时的持续时长。

  • items 获取到的统计数据项。是一个 JSON Array。

    • new 新增用户

    • online 在线用户

    • active 活跃用户

错误码

错误码定义

Code 描述 详细解释
10 系统内部错误 系统内部错误
2003 无权使用此接口 必须改正
3001 HTTP Basic authorization 失败。 请检查调用验证,Appkey 与 MasterSecret 的正确性
3004 time_unit 与 start 参数值不匹配 必须修正
3005 针对单个应用,只支持查询 60 天以内的用户信息;针对分组应用,只支持查询 30 天以内的用户信息。

返回示例

< HTTP/1.1 401 Unauthorized < Content-Type: application/json < { "error": { "code": 3001, "message": "Basic authentication failed" } }
          < HTTP/1.1 401 Unauthorized
< Content-Type: application/json
<
{ 
  "error": {
        "code": 3001, 
        "message": "Basic authentication failed"
     }
}

        
此代码块在浮窗中显示

参考文档:HTTP-Status-Code

文档内容是否对您有帮助?

Copyright 2011-2022, jiguang.cn, All Rights Reserved. 粤ICP备12056275号-13 深圳市和讯华谷信息技术有限公司

在文档中心打开