[关闭]
@rzzx 2016-10-09T06:11:08.000000Z 字数 1810 阅读 971

掌上听云客户端App API接口-图表

App

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

内网:http://reportlocal.tingyun.com
外网:https://report.tingyun.com



图表JSON数据格式(需请求数据头文件里声明'X-Accept-Language': 'zh-cn')

1.应用列表

URL

/highcharts-chart-data/LATEST/account/mobileApplications/charts/{chartId}.json

请求参数

参数 必选 类型 说明
_ty_auth_token true string token从authlocal.tingyun.com:10886/auth/api/auth/login获取
mobileAppId true string 移动AppID
chartId true string 图表ID,一开始定死
timePeriod true string 时间间隔 相差多少分钟
endTime false string 结束时间 格式如:yyyy-MM-dd HH:mm:ss
timeZone false String 时区

chartId讲解(这个有一个总表)

图表标题 chartId
TOP5 响应时间最慢主机 mobile-application-top-host-performance
TOP5吞吐率最高主机 mobile-application-top-host-throughput

图表标题(写死)
响应数据

  1. /*成功响应*/
  2. {
  3. "status":200,
  4. "data":{
  5. "chart":{
  6. "series":[
  7. {
  8. "name":"www.cesuba.com",
  9. "color":"#5a4099",
  10. "data":[
  11. {
  12. "x":1462982400000,
  13. "y":3.104
  14. },
  15. {
  16. "x":1464537600000,
  17. "y":0.505
  18. }
  19. ],
  20. "params":"{"hostId":9}"
  21. },
  22. ...
  23. ],
  24. "aggregateValue":0.722,//平均值
  25. "xAxis":[
  26. {
  27. "tickInterval":"MM-dd HH:mm",
  28. "type":"datetime"
  29. }
  30. ],
  31. "yAxis":[
  32. {
  33. "tickUnit":"rpm"
  34. }
  35. ]
  36. },
  37. "type":"area"
  38. }
  39. }

2.关键元素列表

URL

highcharts-chart-data/LATEST/account/mobileKeyUrl/charts/{chartId}.json

请求参数

参数 必选 类型 说明
_ty_auth_token true string token从authlocal.tingyun.com:10886/auth/api/auth/login获取
mobileKeyUrlId true string 移动AppID
chartId true string 图表ID,一开始定死
timePeriod true string 时间间隔 相差多少分钟
endTime false string 结束时间 格式如:yyyy-MM-dd HH:mm:ss
timeZone false String 时区

chartId讲解(这个有一个总表)

图表标题 chartId
TOP5 响应时间最慢主机 mobile-application-top-host-performance
TOP5吞吐率最高主机 mobile-application-top-host-throughput

图表标题(写死)
响应数据

  1. /*成功响应*/
  2. {
  3. "status":200,
  4. "data":{
  5. "chart":{
  6. "series":[
  7. {
  8. "name":"www.cesuba.com",
  9. "color":"#5a4099",
  10. "data":[
  11. {
  12. "x":1462982400000,
  13. "y":3.104
  14. },
  15. {
  16. "x":1464537600000,
  17. "y":0.505
  18. }
  19. ],
  20. "params":"{"hostId":9}"
  21. },
  22. ...
  23. ],
  24. "aggregateValue":0.722,//平均值
  25. "xAxis":[
  26. {
  27. "tickInterval":"MM-dd HH:mm",
  28. "type":"datetime"
  29. }
  30. ],
  31. "yAxis":[
  32. {
  33. "tickUnit":"rpm"
  34. }
  35. ]
  36. },
  37. "type":"area"
  38. }
  39. }
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注