@rzzx
2017-07-12T06:40:14.000000Z
字数 5038
阅读 674
Browser
文档中主机名需要参考以下配置:
URL
/mobileApplication/appList
示例URL
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| endTime | false | string | 结束时间 格式如:yyyy-MM-dd HH:mm:ss |
| timePeriod | false | string | 时间间隔 相差多少分钟,默认30分钟 |
| name | false | string | 查询字段为空则为查询所有 |
响应数据
/*成功响应*/{"status":200,"data": [//没有数据的部分,即是隐藏的应用(字段和有数据部分是一样的,所以只标注有数据的部分){"id":"7138","name":"Appserver-Frontend-Ruby","agreementId":"1760","agentVersion":null,"dataVersion":null,"accountId":"1759","deployType":"1","applicationId":"127437","mobileAppId":"0","relateAppId":"127437","relateAppName":"Appserver-Frontend-Ruby","relateAppUrl":"https://reportalpha1.tingyun.com/server/application/127437/overview","apdexT":"7000","traceThreshold":"7000","granularType":"2","focusCountry":"48","urlPatternStatus":"0","urlPattern":"","customUrlPattern":"","status":"1","pageLoadTimeTotal":null,"throughput":null,"ajaxResponseTimeTotal":null,"ajaxCount":null,"jsErrorCount":null,"ctime":1493264692000,"mtime":null,"apdex":null,"apdexView":null,"apdexStat":"noData","noData":"24h","ajaxServer":0,"keyPages":null,"keyAjaxs":null,"htmlLoadTimeTotal":null,"pageRenderTimeTotal":null,"ignoreErr":0,"hasNewAgentVersion":false,"fsThreshold":null,"fpThreshold":null,"drThreshold":null},{"id":"7061",//后面会用到"name":"report-server",//Browser名称(上面的,应该取这个)"agreementId":"1760","agentVersion":"1.6.0","dataVersion":"1.6.0","accountId":"1759","deployType":"1","applicationId":"127070","mobileAppId":"0","relateAppId":"127070","relateAppName":"report-server",//Server名称(下面的)"relateAppUrl":"https://reportalpha1.tingyun.com/server/application/127070/overview","apdexT":"7000","traceThreshold":"7000","granularType":"2","focusCountry":"48","urlPatternStatus":"0","urlPattern":"","customUrlPattern":"","status":"1","pageLoadTimeTotal":"2.96",//完全加载(s)"throughput":"0.43",//访问量(ppm)"ajaxResponseTimeTotal":null,"ajaxCount":null,"jsErrorCount":"0.00",//js错误率(%)"ctime":1487835823000,"mtime":1499307915000,"apdex":"1.00","apdexView":"1.00 T[7.000s]",//Apdex"apdexStat":"3",//此字段判断红圈的颜色(3:green,2:yellow,1:red,0:gray)"noData":null,"ajaxServer":0,"keyPages":null,"keyAjaxs":null,"htmlLoadTimeTotal":"0.34",//HTML加载(s)"pageRenderTimeTotal":"2.33",//页面渲染(s)"ignoreErr":0,"hasNewAgentVersion":false,"fsThreshold":null,"fpThreshold":null,"drThreshold":null},...]}}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
if (obj.noData == null) {正常展示}
URL
/mobileApplication/keyPages
示例URL
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| name | false | string | 查询字段为空则为查询所有 |
响应数据
/*成功响应*{"status":200,"data":[{"id":444,//后面会用到"accountId":1759,"agreementId":1760,"apdexT":7000,"browserApplicationId":7069,//后面会用到"name":"gaow-测试关键页面首包",//关键页面名称"browserApplicationName":"gaow",//所属应用"keyType":0,"hostId":0,"hostName":null,"mergerUrlId":0,"urlName":null,"fullUrl":null,"regularExpression":null,"status":1,"ctime":1489976023000,"mtimekey":1492157344000,"mtime":1499071781000,"pageLoadTimeTotal":"1.06",//加载时间"pageAccessRate":"1.93",//页面访问率"ajaxResponseTimeTotal":"0.06",//AJAX请求响应时间"ajaxThroughputRate":"1.9000",//AJAX请求吞吐率"jsErrorRate":"0.00",//js错误率"apdex":"1.00","apdexView":"1.00 T[7.000s]",//Apdex"noData":"24h","browserApp":{"id":7069,"name":null,"type":null,"typeCode":0}},...]}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
if (obj.noData == 30m) {print 此关键AJAX请求30分钟内暂无数据} else if(obj.noData == 24h) {print 此关键AJAX请求24小时之内暂无数据} else {正常显示}
URL
/mobileApplication/keyAjaxList
示例URL
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
| name | false | string | 查询字段为空则为查询所有 |
响应数据
/*成功响应*{"status":200,"data":[{"id":143,//后面会用到"accountId":1759,"agreementId":1760,"browserApplicationId":7061,"name":"fgh",//关键AJAX请求名称"browserApplicationName":"report-server",//所属应用"keyType":0,"hostId":0,"hostName":null,"mergerUrlId":0,"urlName":null,"fullUrl":null,"regularExpression":null,"methodType":0,"status":1,"ctime":1498647606000,"mtimekey":1498647606000,"mtime":1499743628000,"loadTimeTotal":"0.07",//加载时间(s)"ajaxResponseTimeTotal":"0.07",//Ajax响应时间(s)"ajaxCallbackTimeTotal":"0.00",//Ajax回调时间(s)"ajaxThroughputRate":"0.07",//AJAX请求吞吐率"errorRate":"0.00",//错误率"noData":"30m","browserApp":{"id":7061,"name":null,"type":null,"typeCode":0}},...]}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
if (obj.noData == null) {正常展示}