开发者社区> 问答> 正文

怎么使用设备新增与留存



QueryDeviceStat



描述


查询App维度的设备统计。目前只支持返回天的数据,天维度最多支持查31天内数据。

请求参数

名称类型是否必须描述
ActionString操作接口名称,取值:QueryDeviceStat
AppKeyLongAppKey信息
StartTimeString查询的起始时间, ISO-8601格式, 格式为 YYYY-MM-DDThh:mm:ssZ
EndTimeString查询的结束时间, ISO-8601格式, 格式为 YYYY-MM-DDThh:mm:ssZ
DeviceTypeString设备类型,取值范围为:
  • iOS:iOS设备
  • ANDROID:Andriod设备
  • ALL:全部类型设备
QueryTypeString查询的是新增设备数还是历史累计设备数,NEW:是新增设备,TOTAL:是累计设备数


响应参数

名称类型描述
AppDeviceStats复杂对象设备统计数据AppDeviceStat组成的数组


错误码



示例



请求示例

  1. [backcolor=transparent]http[backcolor=transparent]:[backcolor=transparent]//cloudpush.aliyuncs.com/?Action=QueryDeviceStat
  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]28T00[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]DeviceType[backcolor=transparent]=[backcolor=transparent]iOS
  6. [backcolor=transparent]&[backcolor=transparent]QueryType[backcolor=transparent]=[backcolor=transparent]NEW
  7. [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]<QueryDeviceStatResponse>
  3. [backcolor=transparent]    [backcolor=transparent]<RequestId>[backcolor=transparent]9998B3CC-ED9E-4CB3-A8FB-DCC61296BFBC[backcolor=transparent]</RequestId>
  4. [backcolor=transparent]    [backcolor=transparent]<AppDeviceStats>
  5. [backcolor=transparent]      [backcolor=transparent]<AppDeviceStat>
  6. [backcolor=transparent]        [backcolor=transparent]<Time>[backcolor=transparent]2016-07-28T00:00:00Z[backcolor=transparent]</Time>
  7. [backcolor=transparent]        [backcolor=transparent]<Count>[backcolor=transparent]100[backcolor=transparent]</Count>
  8. [backcolor=transparent]        [backcolor=transparent]<DeviceType>[backcolor=transparent]iOS[backcolor=transparent]</DeviceType>
  9. [backcolor=transparent]      [backcolor=transparent]</AppDeviceStat>
  10. [backcolor=transparent]      [backcolor=transparent]<AppDeviceStat>
  11. [backcolor=transparent]        [backcolor=transparent]<Time>[backcolor=transparent]2016-07-29T00:00:00Z[backcolor=transparent]</Time>
  12. [backcolor=transparent]        [backcolor=transparent]<Count>[backcolor=transparent]100[backcolor=transparent]</Count>
  13. [backcolor=transparent]        [backcolor=transparent]<DeviceType>[backcolor=transparent]iOS[backcolor=transparent]</DeviceType>
  14. [backcolor=transparent]      [backcolor=transparent]</AppDeviceStat>
  15. [backcolor=transparent]    [backcolor=transparent]</AppDeviceStats>
  16. [backcolor=transparent]</QueryDeviceStatResponse>


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]"AppDeviceStats"[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-28T00:00:00Z"[backcolor=transparent],
  6. [backcolor=transparent]      [backcolor=transparent]"Count"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]100[backcolor=transparent],
  7. [backcolor=transparent]      [backcolor=transparent]"DeviceType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"New"
  8. [backcolor=transparent]    [backcolor=transparent]},
  9. [backcolor=transparent]    [backcolor=transparent]{
  10. [backcolor=transparent]      [backcolor=transparent]"Time"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"2016-07-29T00:00:00Z"[backcolor=transparent],
  11. [backcolor=transparent]      [backcolor=transparent]"Count"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]100[backcolor=transparent],
  12. [backcolor=transparent]      [backcolor=transparent]"DeviceType"[backcolor=transparent]:[backcolor=transparent] [backcolor=transparent]"New"
  13. [backcolor=transparent]    [backcolor=transparent]}
  14. [backcolor=transparent]  [backcolor=transparent]]
  15. [backcolor=transparent]}

展开
收起
猫饭先生 2017-10-23 10:34:28 1354 0
0 条回答
写回答
取消 提交回答
问答分类:
问答地址:
问答排行榜
最热
最新

相关电子书

更多
动态、高效,蚂蚁动态卡片的内核逻辑 立即下载
十分钟上线-使用函数计算构建支付宝小程序服务 立即下载
4.29【阿里云5大安全产品全面升级在线发布-会后分享文档】 立即下载