Report API

The Received API takes msg_id as a parameter to obtain delivery statistics for this msg_id.

If there are many objects of an API call push(such as broadcast push), the statistics returned by this API will continue to increase because of persistent client delivery.

Delivery statistics for each push message last up to 10 days. That is, the delivery statistics will be cleared after a message is sent for 10 days.

API Endpoint

https://report.jpush.cn

  1. (message) explanation: only https access is supported, not support direct http access

Resource

GET /v2/received

Example Request

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

Request Params

  • A list of msg_ids returned by push API. Multiple msg_ids are separated by commas, and up to 100 msg_ids are supported.
  • Value of HTTP Header Authorization: Basic base64_auth_string
    • Generation rule of base64_auth_string is: base64(appKey:masterSecret)
    • Note that the appKey is separated from the masterSecret by a “:” colon
    • Please refer to the relevant specification document: Basic Authentication of HTTP.

Example Response

  1. < HTTP/1.1 200 OK
  2. < Content-Type: application/json
  3. <
  4. [ {"android_received":62,
  5. "ios_apns_sent":11,
  6. "msg_id":1613113584},
  7. {"android_received":56,
  8. "ios_apns_sent":33,
  9. "msg_id":1229760629},
  10. {"android_received":null,
  11. "ios_apns_sent":14,
  12. "msg_id":1174658841},
  13. {"android_received":32,
  14. "ios_apns_sent":null,
  15. "msg_id":1174658641}
  16. ]

Response Params

JSON Array.

  • android_received: Android delivery. Null if there is no such data.
  • ios_apns_sent: iOS push succeed. Null if there is no such data.

Example Error Response

  1. < HTTP/1.1 401 Unauthorized
  2. < Content-Type: application/json
  3. <
  4. {
  5. "error": {
  6. "code": 3001,
  7. "message": "Basic authentication failed"
  8. }
  9. }

HTTP Return Code

Reference Document:HTTP-Status-Code

Definition of Error Code

Code Description Detailed Explanation
10 Internal system error
3001 HTTP Basic authorization fails. Please refer to instructions for API documentation
3002 The msg_ids parameter does not exist