[关闭]
@rzzx 2017-07-26T07:40:32.000000Z 字数 1932 阅读 747

掌上听云客户端Browser API接口-用户体验分析和PV获取

Browser

文档中主机名需要参考以下配置:

内网:http://192.168.5.73:8084/tingyun-api-browser
外网:



1.获取汇总列表数据

URL

/browser/url/lists

示例URL

http://192.168.5.73:8084/tingyun-api-browser/browser/url/lists?_ty_auth_token=kl2ir1io8oz1l8uamxyaql34twi6rm4e&browserAppId=7061&endTime=&timePeriod=129600&pageNo=1&pageSize=20

请求参数

参数 必选 类型 说明
_ty_auth_token true string token客户端获取
browserAppId true int browser ID
endTime false string 结束时间 格式如:yyyy-MM-dd HH:mm:ss
timePeriod false string 时间间隔 相差多少分钟
pageNo false int 第几页
pageSize false int 每页大小
timeZone false String 区域

响应数据

  1. /*成功响应*/
  2. {
  3. "status":200,
  4. "data":{
  5. "total" : 112,//总共有多少条
  6. "dataSize" : 20,//此次data对象数组的size
  7. "pageSize" : 20,//页面大小
  8. "totalPages" : 6,//总共有多少页
  9. "data" : [ {
  10. "uriId" : 19531775,
  11. "hostId" : 123798,
  12. "pageUri" : "https:SpringController/KeyActionController/overview",
  13. "host" : "reportalpha1.tingyun.com",
  14. "uri" : "https://reportalpha1.tingyun.com/SpringController/KeyActionController/overview",//URL
  15. "count" : 3387,//PV(次)
  16. "loadTime" : 1.892,//完全加载(s)
  17. "witeScreenTime" : 1.197,//白屏时间(s)
  18. "firstScreenTime" : 1.191,//首屏时间(s)
  19. "domReadyTime" : 1.267,//可交互(s)
  20. "jsErrorRate" : 0.08,//JS错误率(%)
  21. "traceCount" : 274,//慢页面次数(次), 报表 慢页面次数 字体 变蓝(traceRatio>0)
  22. "traceRatio" : 8.09,//慢页面占比(%)
  23. "throughput" : 0.0,
  24. "carrierId" : 0,
  25. "carrier" : null
  26. },
  27. ...
  28. }
  29. /*错误响应*/
  30. {
  31. "status":-1,
  32. "data":"_ty_auth_token is NULL"
  33. }
  34. /*错误响应*/
  35. {
  36. "status":-500,
  37. "message":"system error."
  38. }

2.获取PV

URL

/browser/url/infos

示例URL

http://192.168.5.73:8084/tingyun-api-browser/browser/url/infos?_ty_auth_token=bdlj7muhh1njua3qr5c0rkulxjy9soe4&browserAppId=7061&endTime=&timePeriod=129600&host_id=123798&uri_id=19531775

请求参数

参数 必选 类型 说明
_ty_auth_token true string token客户端获取
browserAppId true int browser ID
endTime false string 结束时间 格式如:yyyy-MM-dd HH:mm:ss
timePeriod false string 时间间隔 相差多少分钟
host_id true int 列表返回的参数hostId
uri_id true int 列表返回的参数uriId
timeZone false String 区域

响应数据

  1. /*成功响应*/
  2. {
  3. "status":200,
  4. "data":{
  5. "pv":3376//网站只有PV>0才显示前面的URL
  6. }
  7. }
  8. /*错误响应*/
  9. {
  10. "status":-1,
  11. "data":"_ty_auth_token is NULL"
  12. }
  13. /*错误响应*/
  14. {
  15. "status":-500,
  16. "message":"system error."
  17. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注