开发者社区> 问答> 正文

APP维度推送统计如何实现?



QueryPushStatByApp



描述


查询APP维度的推送统计。

请求参数

名称类型是否必须描述
ActionString操作接口名称,取值:QueryPushStatByApp
AppKeyLongAppKey信息
StartTimeString查询的起始时间, ISO-8601格式, 格式为 YYYY-MM-DDThh:mm:ssZ
EndTimeString查询的结束时间, ISO-8601格式, 格式为 YYYY-MM-DDThh:mm:ssZ
GranularityString返回的数据粒度,HOUR:是小时粒度,DAY:是天粒度。小时粒度允许查24小时内数据,天粒度允许查31内天数据,目前只支持天粒度查询。


响应参数

名称类型描述
AppPushStats复杂对象app推送统计AppPushStat组成的数据,根据时间粒度返回数据


错误码

错误码描述HTTP 状态码语义
TaskWaitingThe requested data is processing.400请求的数据正在处理中
StatInvalidDateThe request time can’t exceeds 30 days.400查询时间不能超过30天


示例



请求示例

  1. [backcolor=transparent]http[backcolor=transparent]:[backcolor=transparent]//cloudpush.aliyuncs.com/?Action=QueryPushStatByApp
  2. [backcolor=transparent]&[backcolor=transparent]AppKey[backcolor=transparent]=[backcolor=transparent]23267207
  3. [backcolor=transparent]&[backcolor=transparent]StartTime[backcolor=transparent]=[backcolor=transparent]2016[backcolor=transparent]-[backcolor=transparent]07[backcolor=transparent]-[backcolor=transparent]25T00[backcolor=transparent]:[backcolor=transparent]00[backcolor=transparent]:[backcolor=transparent]00Z
  4. [backcolor=transparent]&[backcolor=transparent]EndTime[backcolor=transparent]=[backcolor=transparent]2016[backcolor=transparent]-[backcolor=transparent]07[backcolor=transparent]-[backcolor=transparent]29T00[backcolor=transparent]:[backcolor=transparent]00[backcolor=transparent]:[backcolor=transparent]00Z
  5. [backcolor=transparent]&[backcolor=transparent]Granularity[backcolor=transparent]=[backcolor=transparent]DAY
  6. [backcolor=transparent]&<公共请求参数>


返回示例



XML格式

  1. [backcolor=transparent]<?[backcolor=transparent]xml version[backcolor=transparent]=[backcolor=transparent]'1.0'[backcolor=transparent] encoding[backcolor=transparent]=[backcolor=transparent]'UTF-8'[backcolor=transparent]?>
  2. [backcolor=transparent]<QueryPushStatByAppResponse>
  3. [backcolor=transparent]   [backcolor=transparent]<RequestId>[backcolor=transparent]9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC[backcolor=transparent]</RequestId>
  4. [backcolor=transparent]    [backcolor=transparent]<AppPushStats>
  5. [backcolor=transparent]      [backcolor=transparent]<AppPushStat>
  6. [backcolor=transparent]        [backcolor=transparent]<Time>[backcolor=transparent]2016-07-25T00:00:00Z[backcolor=transparent]</Time>
  7. [backcolor=transparent]        [backcolor=transparent]<AcceptCount>[backcolor=transparent]120[backcolor=transparent]</AcceptCount>
  8. [backcolor=transparent]        [backcolor=transparent]<SentCount>[backcolor=transparent]100[backcolor=transparent]</SentCount>
  9. [backcolor=transparent]        [backcolor=transparent]<ReceivedCount>[backcolor=transparent]60[backcolor=transparent]</ReceivedCount>
  10. [backcolor=transparent]        [backcolor=transparent]<OpenedCount>[backcolor=transparent]30[backcolor=transparent]</OpenedCount>
  11. [backcolor=transparent]        [backcolor=transparent]<DeletedCount>[backcolor=transparent]10[backcolor=transparent]</DeletedCount>
  12. [backcolor=transparent]      [backcolor=transparent]</AppPushStat>
  13. [backcolor=transparent]      [backcolor=transparent]<AppPushStat>
  14. [backcolor=transparent]        [backcolor=transparent]<time>[backcolor=transparent]2016-07-29T00:00:00Z[backcolor=transparent]</time>
  15. [backcolor=transparent]        [backcolor=transparent]<AcceptCount>[backcolor=transparent]120[backcolor=transparent]</AcceptCount>
  16. [backcolor=transparent]        [backcolor=transparent]<SentCount>[backcolor=transparent]100[backcolor=transparent]</SentCount>
  17. [backcolor=transparent]        [backcolor=transparent]<ReceivedCount>[backcolor=transparent]60[backcolor=transparent]</ReceivedCount>
  18. [backcolor=transparent]        [backcolor=transparent]<OpenedCount>[backcolor=transparent]30[backcolor=transparent]</OpenedCount>
  19. [backcolor=transparent]        [backcolor=transparent]<DeletedCount>[backcolor=transparent]10[backcolor=transparent]</DeletedCount>
  20. [backcolor=transparent]      [backcolor=transparent]</AppPushStat>
  21. [backcolor=transparent]    [backcolor=transparent]</AppPushStats>
  22. [backcolor=transparent]</QueryPushStatByAppResponse>


JSON格式

  1. [backcolor=transparent]{
  2. [backcolor=transparent]  [backcolor=transparent]"RequestId"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC"[backcolor=transparent],
  3. [backcolor=transparent]  [backcolor=transparent]"AppPushStats"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent][
  4. [backcolor=transparent]    [backcolor=transparent]{
  5. [backcolor=transparent]      [backcolor=transparent]"Time"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"2016-07-25T00:00:00Z"[backcolor=transparent],
  6. [backcolor=transparent]      [backcolor=transparent]"AcceptCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]120[backcolor=transparent],
  7. [backcolor=transparent]      [backcolor=transparent]"SentCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]100[backcolor=transparent],
  8. [backcolor=transparent]      [backcolor=transparent]"ReceivedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]60[backcolor=transparent],
  9. [backcolor=transparent]      [backcolor=transparent]"OpenedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]30[backcolor=transparent],
  10. [backcolor=transparent]      [backcolor=transparent]"DeletedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]10
  11. [backcolor=transparent]    [backcolor=transparent]},
  12. [backcolor=transparent]    [backcolor=transparent]{
  13. [backcolor=transparent]      [backcolor=transparent]"Time"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"2016-07-29T00:00:00Z"[backcolor=transparent],
  14. [backcolor=transparent]      [backcolor=transparent]"AcceptCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]120[backcolor=transparent],
  15. [backcolor=transparent]      [backcolor=transparent]"SentCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]100[backcolor=transparent],
  16. [backcolor=transparent]      [backcolor=transparent]"ReceivedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]60[backcolor=transparent],
  17. [backcolor=transparent]      [backcolor=transparent]"OpenedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]30[backcolor=transparent],
  18. [backcolor=transparent]      [backcolor=transparent]"DeletedCount"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]10
  19. [backcolor=transparent]    [backcolor=transparent]}
  20. [backcolor=transparent]  [backcolor=transparent]]
  21. [backcolor=transparent]}

展开
收起
猫饭先生 2017-10-23 10:33:07 1547 0
0 条回答
写回答
取消 提交回答
问答排行榜
最热
最新

相关电子书

更多
女性移动App安全攻防战 立即下载
汇聚云计算的生态核能——云市场,云上APP Store 立即下载
千万级用户直播App——服务端架构设计和思考 立即下载