@rzzx
2017-09-06T09:05:26.000000Z
字数 3167
阅读 1458
App
文档中主机名需要参考以下配置:
内网:http://reportlocal.tingyun.com
外网:https://report.tingyun.com
URL
/mobileApplication/mobileAppList
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _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 | 时间间隔 相差多少分钟 |
响应数据
/*成功响应*/{"status": 200,"data":[{"mobileAppId":1,//移动AppID"mobileAppName":"cesuba",//app名称"typeId":1,//App分类:1 - 游戏 2 - 儿童 3 - 教育 4 - 杂志 5 - 摄影录像 6 - 效率 7 - 生活 8 - 健康 9 - 旅游 10 - 音乐 11 - 体育 12 - 商务 13 - 新闻 14 - 工具 15 - 娱乐 16 - 社交 17 - 美食 18 - 财务 19 - 参考 20 - 导航 21 - 医疗 22 - 图书 23 - 天气 24 - 其他"type":"相应App分类","dataStatus":1,"appStatus":1,//应用状态: 1 - 启用 0 - 禁用 -1 - 已删除"data":[{//只有dataStatus为2时写入data"activeTime":"2015-12-12",//激活时间"activeDevices":1,//总设备数"activeVersions":1,//总共有多少不同的版本号"score":0,//总分"status":0,//性能状态:0 - 正常 1- 警告 2 - 严重"responseTime":{"score":100,//应用最近30分钟得分 下同"status":0,"tooltips":"共检测到560条HTTP请求,平均响应时间600ms","unit":"ms",//性能指标单位"value":600.0//性能指标数值},"crashPercent":{"score":80,"status":1,"tooltips":"一周内平均崩溃率为0‰,属于正常范围","unit":"%","value":10.03},"httpErrorPercent":{"score":80,"status":1,"tooltips":"平均HTTP错误率为10.03%,您需要重点关注","unit":"%","value":10.03},"networkErrorPercent":{"score":81,"status":1,"tooltips":"平均网络错误率为9.74%,您需要重点关注","unit":"%","value":9.03}}]}},......]/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
URL
/mobileApplication/mobileAppList2
示例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 | 时间间隔 相差多少分钟 |
| name | false | string | 查询字段 |
响应数据
/*成功响应*/{"status": 200,"data":[{"mobileAppId":3574,//移动AppID"mobileAppName":"pb_test_sk",//app名称"active":1,//是否嵌码"appStatus":1,//是否禁用"appScore":96,//app分数"appLevel":0,"agentType":0,//1:iOS;2:Android"count":144,"active_version":1,//活跃版本数"time":323.361,//响应时间(ms)"timeUnit":null,//单位(没用)"timeScore":85,"crash":0,//崩溃率(‰)"crashUnit":null,//单位(没用)"crashScore":100,//崩溃分数"error":0,//错误率(%)"errorUnit":null,//单位(没用)"errorScore":100,"anr":0,//卡顿(%)"anrUnit":null,//单位(没用)"anrScore":100,"flow":0.001,//流量消耗(KB)"flowUnit":null,//单位(没用)"flowScore":100,"endTime":2330400},...}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}
展示逻辑
if(obj.appStatus == 0){//禁用app} else if(obj.active == 0) {//未嵌码} else if(obj.count == 0) {//没数据} else {正常显示}
URL
/mobileApplication/mobileKeyUrlList
请求参数
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
| _ty_auth_token | true | string | token从authlocal.tingyun.com:10886/auth/api/auth/login获取 |
响应数据
/*成功响应*{"status":200,"data":[{"id":484,"owner_id":1759,"mobile_app_id":3071,"url":"http://www.taobao.com/shangcheng","name":"post","match_mode":"0","appName":"0808jjj","mobileAppKeyUrlStat":{//如果为不存在则为"""throughput":690.8,//Http请求吞吐量"responseTime":"1.000",//平均响应时间"httpErrorRate":"68.0",//Http错误率"networkErrorRate":"31.0"//网络错误率},"newAlarmStatus":2,//警报状态"uid":484},......]}/*错误响应*/{"status":-1,"data":"_ty_auth_token is NULL"}/*错误响应*/{"status":-500,"message":"system error."}