超越物联
为了方便exlive用户进行手机APP的二次开发,exlive1.0平台开发了APP二次开发接口,支持登录接口、当前用户车辆的详细信息、车辆的详细位置信息、里程统计查询、警情报警查询、车辆轨迹查询等接口的调用。
1、登录接口,用于用户的登录:
http://" +服务器ip + ":89/gpsonline/NBAPI
参数
参数 | 类型 | 说明 |
---|---|---|
version | String | 版本号 |
method | String |
企业用户:loginSystemInUser 个人用户 :loginSystemInVehicle |
name | String | 用户名 |
pwd | String | 密码 |
Key | String | 登录类型 |
m | String | 用户登陆成功key |
返回:
{
"port": 6266,
"uid": 2314223,
"sid": 10997,
"sip": "114.215.45.206",
"sname": "广东省322",
"success": true,
"key": "ae3de561cbf500295ee2d1fd25d12266",
"entCode": "",
"userType": 1,
"version": 2
}
2、当前用户车辆的清单,包含车辆详细信息、车辆的详细位置信息等:
http://" + 服务器ip + ":89/gpsonline/NBAPI
参数-体验账号
参数 | 类型 | 说明 |
---|---|---|
method | String | 方法: experience |
uid | String | 用户ID |
key | String | 用户key |
参数-企业或个人账号
参数 | 类型 | 说明 |
---|---|---|
version | String | 版本号 |
method | String | 方法: loadVehicleTreeInUser |
uid | String | 用户ID |
key | String | 用户key |
method | String | 方法: experience |
返回:
{
"version": 2,
"success": true,
"groups": [{
"id": 3260712,
"name": "备用车辆",
"onlines": 0,
"total": 5,
"vehicles": [{
"id": 8959906,
"name": "29号 新丝路专线 京AAP20",
"isOnline": true,
"recvtime": "2017-12-28 19:50:11",
"gpstime": "2017-12-28 19:50:09",
"mobile": "1064867783646",
"gprs": "13300185424",
"mobileId": 92,
"vehicleTypeId": 1,
"owner": "",
"phone": "",
"overdueDays": 10000,
"state": "停车超时(1时33分) 卫星(19) GSM(20)",
"lat": 34.36505,
"lng": 109.06033,
"lat_xz": -0.001295,
"lng_xz": 0.005053,
"speed": 0,
"direct": 64,
"temp": 0,
"oil": 0,
"oilMN1": 0,
"oilMN2": 0,
"distance": 110.3,
"totalDis": 16503.27,
"av": "1",
"info": "陕西省 西安市 灞桥区 新筑街道 港务大道220号 港务大道 西安·华南城东117米",
"vhcofflinemin": 10,
"stopDefDis": 0,
"stopDefLat": 0,
"stopDefLng": 0,
"temp1": "",
"temp2": "",
"temp3": "",
"temp4": "",
"dayOil": 11,
"acc": 0,
"acc2": 0,
"oil1": 0,
"oil2": 0,
"icon": 0
}]
}],
"cmd": [{
"id": 1003,
"mobileId": 92,
"mask": 7000,
"mean": "连续回报",
"pass": " ",
"description": "设置车辆上传数据的间隔,单位为秒",
"cmdlevel": 0,
"params": [{
"name": "回报间隔",
"size": "small",
"type": "int"
},
{
"name": "确认密码",
"size": "small",
"type": "password"
}
]},
{
"id": 2086,
"mobileId": 105,
"mask": 7561,
"mean": "设置分服务器APN",
"pass": "",
"description": "设置分服务器APN",
"cmdlevel": 0,
"params": [{
"name": "APN名称",
"size": "small",
"type": "string",
"value": ""
},
{
"name": "用户名",
"size": "small",
"type": "string",
"value": ""
},
{
"name": "用户密码",
"size": "small",
"type": "string",
"value": ""
}]
}],
"timestamp": 1514461833919
}
3、里程统计查询:
http://" +服务器ip + ":89/exstatic/json/phoneVehicleAction_dailyReportByIds.action?
参数
参数 | 类型 | 说明 |
---|---|---|
pids | String | 车辆ID |
btime | String | 开始时间 |
etime | String | 结束时间 |
返回:
{
"drListAll": [{
"totaldis": "0.0",
"drList": [{
"daydis": "0.0",
"date": "2017-12-28"
}],
"drCount": 1,
"vname": "t66yy6",
"vid": 9676417
}],
"flag": true
}
4、警情报警查询:
http:// " +服务器ip + ":89/exstatic/json/vehicleAction_PhoneVehicleByuserId.action?
参数
参数 | 类型 | 说明 |
---|---|---|
pids | String | 车辆ID |
btime | String | 开始时间 |
etime | String | 结束时间 |
返回:
{
"flag": true,
"accdata": [{
"id": 7669178,
"vhccode": "02号 中一线 京AAP055",
"acccount": 17,
"detailAlarm": [{
"direct": 270,
"recvtime": "2017-12-28 07:10:12",
"posinfo": "陕西省西安市新城区中山门街道解放路63-5号东新街民乐新都会商城西北86米",
"veo": "0.00",
"driver": "",
"cstate": "停车超时报警(1分)卫星(13)GSM(27)",
"av": "1"
},
{
"direct": 92,
"recvtime": "2017-12-28 07:14:57",
"posinfo": "陕西省西安市新城区西一路街道东新街486号东新街新城国际东北80米",
"veo": "0.00",
"driver": "",
"cstate": "停车超时报警(1分)卫星(18)GSM(31)",
"av": "1"
}]
}],
"vhcCount": 17
}
5、车辆轨迹查询:
http://" +服务器ip + ":89/gpsonline/NBAPI?
参数
参数 | 类型 | 说明 |
---|---|---|
version | String | 版本号 |
method | String | 方法 :loadHistory |
vid | String | 车辆Id |
bTime | String | 开始时间 |
eTime | String | 结束时间 |
uid | String | 用户Id(仅企业用户需要传用户ID) |
key | String | 用户Key:企业和个人用户传key 体验账号传experience |
datatype | String | 是否回放停车点 0:没有停车点 1:有停车点 |
timeorder | String | 是否按GPSTIME回放 0 :卫星时间, 1:服务器时间 |
返回:
{
"version": 2,
"success": true,
"history": [{
"av": "1",
"dir": 194,
"dis": 0,
"gpst": "2017-12-28 00:00:03",
"id": 10114,
"lat": 34.365166,
"lat_xz": -0.001321,
"lng": 109.0603,
"lng_xz": 0.005025,
"oil": 0,
"p1": 0,
"p2": 0,
"photo": "",
"posinfo": "陕西省 西安市 灞桥区 新筑街道 港务大道220号 港务大道 西安·华南城东北116米",
"recvt": "2017-12-28 00:00:05",
"roadlevel": 7,
"roadveo": 50,
"state": "停车超时报警(3时12分) 卫星(16) GSM(16)",
"temp": 0,
"temp1": "127.0",
"temp2": "127.0",
"temp3": "127.0",
"temp4": "127.0",
"totaldistance": 32584.973,
"veo": 0
},
{
"av": "1",
"dir": 194,
"dis": 0,
"gpst": "2017-12-28 00:00:08",
"id": 10225,
"lat": 34.365166,
"lat_xz": -0.001321,
"lng": 109.0603,
"lng_xz": 0.005025,
"oil": 0,
"p1": 0,
"p2": 0,
"photo": "",
"posinfo": "陕西省 西安市 灞桥区 新筑街道 港务大道220号 港务大道 西安·华南城东北116米",
"recvt": "2017-12-28 00:00:10",
"roadlevel": 7,
"roadveo": 50,
"state": "停车超时报警(3时12分) 卫星(16) GSM(16)",
"temp": 0,
"temp1": "127.0",
"temp2": "127.0",
"temp3": "127.0",
"temp4": "127.0",
"totaldistance": 32584.973,
"veo": 0
}]
}