@rzzx
2016-10-09T06:10:52.000000Z
字数 4157
阅读 4373
App
文档中主机名需要参考以下配置:
内网:http://reportlocal.tingyun.com
外网:https://report.tingyun.com
网络请求的HTTP页面(内网,F12出)当排序后的select控件被选择时,会发出4条ajax请求1./mobileApplication/selectFilter/http/host.json2./highcharts-chart-data/LATEST/accounts/mobileApplications/'charts/mobile-application-top-host-performance.json'3./highcharts-chart-data/LATEST/accounts/mobileApplications/'charts/mobile-application-top-host-throughput.json'4./highcharts-chart-data/LATEST/accounts/mobileApplications/'stacked/charts/mobile-application-top-slow-request-performance-host.json'总结: (请求没有'号)1是tree树(网页左边)接口、2 3 4都是图表(网页右边)的接口 ,且4的请求格式和2 3请求格式有点区别
| 参数 | baseonId |
|---|---|
| 响应时间 | 1 |
| 吞吐率 | 3 |
| 响应时间耗时 | 4 |
| 平均传输数据量 | 5 |
URL
/mobileApplication/selectFilter/http/host.json
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| baseonId | true | string | select选择ID |
| mobileAppId | true | string | 移动AppID |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| timePeriod | false | string | 时间间隔 相差多少分钟 |
| mobileAppVersionFilterId | false | String | 版本号ID |
| timeZone | false | String | 时区 |
响应数据
没什么用==没被赋值{"status":200,"data":[ {"pId" : "-2",//定死的,无意义"formatValue" : null,//没什么用"tmTick" : null,//没什么用"duration_total_caller_percent" : 0.0,//没什么用"jserror_top5_uri_percent" : 0.0,//没什么用"id" : "21",//服务器主机ID"name" : "www.baidu.com","unit" : "KB",//单位"host_id" : 21,//服务器主机ID"host_ip" : 0,//没什么用"uri_id" : -1,//没什么用"serviceFlag" : true,//alias不为null时为true"alias" : "百度-服务","value" : 48.616 //Point_count},...]}
URL
/mobileApplication/selectFilter/http/host/uri.json
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| mobileAppId | true | string | 移动AppID |
| hostId | true | string | 父服务主机ID |
| baseonId | true | string | select选择ID |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| timePeriod | false | string | 时间间隔 相差多少分钟 |
| mobileAppVersionFilterId | false | String | 版本号ID |
| timeZone | false | String | 时区 |
响应数据
{"status":200,"data":[ {"pId" : "667",//父节点服务主机id"formatValue" : null,"tmTick" : null,"duration_total_caller_percent" : 0.0,"jserror_top5_uri_percent" : 0.0,"id" : "667-1",//id-深度"name" : "/*.gif","unit" : "秒","host_id" : 667,"host_ip" : 0,"uri_id" : 13,"serviceFlag" : false,"alias" : "","value" : 7.19},...]}
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 | 时间间隔 相差多少分钟 |
| hideLowerThroughtput | true | string | 是否隐藏<1%的吞吐率(1为true) |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| mobileAppVersionFilterId | false | String | 版本号ID |
| timeZone | false | String | 时区 |
chartId讲解(这个有一个总表)
| 图表标题 | chartId |
|---|---|
| TOP5 响应时间最慢主机 | mobile-application-top-host-performance |
| TOP5吞吐率最高主机 | mobile-application-top-host-throughput |
图表标题(写死)
响应数据
/*成功响应*/{"status":200,"data":{"chart":{"series":[{"name":"www.cesuba.com","color":"#5a4099","data":[{"x":1462982400000,"y":3.104},{"x":1464537600000,"y":0.505}],"params":"{"hostId":9}"},...],"aggregateValue":0.722,//平均值"xAxis":[{"tickInterval":"MM-dd HH:mm","type":"datetime"}],"yAxis":[{"tickUnit":"rpm"}]},"type":"area"}}
URL
/highcharts-chart-data/LATEST/account/mobileApplications/charts/{chartId}.json
点击子tree时,不需要传递hideLowerThroughtput
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| mobileAppId | true | string | 移动AppID |
| hostId | true | string | 父服务主机ID |
| baseonId | true | string | select选择ID(在点击父tree时写死为1) |
| uriId | true | string | 请求子tree的uri_id(只有点击子tree时请求图表时需要传的字段) |
| chartId | true | string | 图表ID,一开始定死 |
| timePeriod | true | string | 时间间隔 相差多少分钟 |
| hideLowerThroughtput | true | string | 是否隐藏<1%的吞吐率(1为true) |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| mobileAppVersionFilterId | false | String | 版本号ID |
| timeZone | false | String | 时区 |
chartId讲解
| 图表标题 | chartId |
|---|---|
| TOP5 响应时间最慢URL | mobile-application-top-host-uri-performance |
| 平均吞吐率 | mobile-application-throughput |
| HTTP错误率 / 网络错误率 | mobile-application-error |
图表标题(写死)
响应数据
/*成功响应*/{"status":200,"data":{"chart":{"series":[{"name":"POST /rqd/sync (https)","color":"#5a4099","data":[{"x":1463414400000,"y":5.83},{"x":1466265600000,"y":0.89},{"x":1466524800000,"y":0.715},{"x":1466784000000,"y":1.109}],"params":"{"uriId":52840,"hostId":4738}"}],"aggregateValue":0,"xAxis":[{"tickInterval":"MM-dd HH:mm","type":"datetime"}],"yAxis":[{"tickUnit":"秒"}]},"type":"line"}}