Summary:
- Obtain historical track records
Version:
No. | Editor | Edit date | Revision date |
---|---|---|---|
2.0.0 | admin | 2020-06-20 | 2020-06-20 |
Request URL:
Request mode:
- POST
Request header:
Parameter | Required field | Data type | Explanation |
---|---|---|---|
Content-Type | yes | string | application/json |
Request parameter:
Parameter | Required field | Data type | Explanation |
---|---|---|---|
FTokenID | yes | string | token |
FAction | yes | string | QueryLBSTrackListByFGUID |
FGUID | yes | string | Unique identification of assets / device |
FType | yes | int | 1:Unique identification of assets 2:Unique identification of device |
FAssetTypeID | yes | int | Device type |
FStartTime | yes | datetime | Start time(UTC) |
FEndTime | yes | datetime | End time(UTC) |
FLanguage | no | int | 1:Chinese 0:English |
FDateType | yes | int | 1:Query by receiving time;0:Query by GPS time |
Response example:
Correct response:
{
"Result": 200,
"Message": "check token success",
"FObject": [
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T16:13:47",
"RT": "2020-12-27T16:14:06",
"Bat": 45,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T16:43:48",
"RT": "2020-12-27T16:44:07",
"Bat": 45,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T17:13:49",
"RT": "2020-12-27T17:14:08",
"Bat": 45,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.06537285643,
"Lat": 22.57270175043,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 176023831,
"GT": "2020-12-27T17:43:50",
"RT": "2020-12-27T17:44:09",
"Bat": 45,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T18:13:51",
"RT": "2020-12-27T18:14:10",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.064252,
"Lat": 22.572598,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 1,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T18:43:26",
"RT": "2020-12-27T18:43:45",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.063952788266,
"Lat": 22.5727879731391,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 176023834,
"GT": "2020-12-27T19:13:53",
"RT": "2020-12-27T19:14:13",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T19:43:54",
"RT": "2020-12-27T19:44:14",
"Bat": 44,
"LS": 1
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T20:13:55",
"RT": "2020-12-27T20:14:16",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.063952788266,
"Lat": 22.5727879731391,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 176023834,
"GT": "2020-12-27T20:43:56",
"RT": "2020-12-27T20:44:16",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T21:13:57",
"RT": "2020-12-27T21:14:17",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T21:43:58",
"RT": "2020-12-27T21:44:19",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T22:13:59",
"RT": "2020-12-27T22:14:20",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.06580855643,
"Lat": 22.57472835043,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 176023821,
"GT": "2020-12-27T22:44:00",
"RT": "2020-12-27T22:44:21",
"Bat": 44,
"LS": 1
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T23:14:01",
"RT": "2020-12-27T23:14:22",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 0.000000,
"Lat": 0.000000,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 0,
"MCC": 0,
"MNC": 0,
"LAC": 0,
"CID": 0,
"GT": "2020-12-27T23:25:50",
"RT": "2020-12-27T23:27:00",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
},
{
"Lon": 114.062655140347,
"Lat": 22.5711617062429,
"Speed": 0,
"Dir": 0,
"Mil": 38,
"LType": 3,
"MCC": 460,
"MNC": 0,
"LAC": 9351,
"CID": 9493077,
"GT": "2020-12-27T23:26:50",
"RT": "2020-12-27T23:27:13",
"Bat": 44,
"LS": 1,
"Hum1": 63,
"Hum2": 0,
"Temp1": 27.799999237060547,
"Temp2": -1000.0
}
]
}
Error response:
{
"Result": 102,
"Message": "Action is error",
"FObject": []
}
Return parameter description:
Parameter | Data type | Explanation |
---|---|---|
Lon | Decimal | Longitude |
Lat | Decimal | Latitude |
Speed | Int | Speed (km/h) |
Dir | Int | Direction (0~360) |
Mil | Int | Mileage (km) |
MCC | Int | MCC |
MNC | Int | MNC |
LAC | Int | LAC |
CID | Int | CID |
GT | DateTime | GPS time(UTC) |
RT | DateTime | Data receiving time(UTC) |
LType | Int | Location type 1:GNSS 2:CellTrack 3:Cell code location 4:Mobile location 0:Unlocated |
Bat | Int | quantity of electricity |
ACC | Int | ACC status (1:Open;0:Close) |
LS | Int | Lock rope status (1: Pull out 0:Insert -1:Undefined) |
LR | Int | Lock state (1: Unlock 0:Lock -1:Undefined) |
CS | Int | GSM signal quality |
GS | Int | Gnss signal quality |
FV1 | Int | Oil level value 1 |
FV2 | Int | Oil level value 2 |
FV3 | Int | Oil level value 3 |
Hum1 | Int | FHumidity1 |
Hum2 | Int | FHumidity2 |
Temp1 | Decimal | FTemperature1 (-1000 indicates invalid data) |
Temp12 | Decimal | FTemperature2 (-1000 indicates invalid data) |
Other result status description:
- 105:Request error
- 104:Token error or expiration
- 102:Request parameter error
Examples:
Java:
String result = "";
//Request url
String url = "http://cloud.assetscontrols.com:8092/OpenApi/LBS";
//Request parameters, JSON format parameters, it is recommended to pass in objects
String body = "{FAction:\"QueryLBSTrackListByFGUID\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUID:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F\",FType:\"1\",FStartTime:\"2020-08-05 16:00:00\",FEndTime:\"2020-08-12 15:59:59\",FAssetTypeID:\"701\",FLanguage:\"1\",FDateType:\"0\"}";
URL realUrl = new URL(url);
// Set properties of general request
URLConnection conn = realUrl.openConnection();
conn.setRequestProperty("accept", "*/*");
conn.setRequestProperty("connection", "keep-Alive");
conn.setRequestProperty("Content-Type", "application/json");
conn.setRequestProperty("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");
conn.setRequestProperty("method", "post");
conn.setDoOutput(true);
conn.setDoInput(true);
PrintWriter pw = new PrintWriter(conn.getOutputStream());
pw.print(body);
pw.flush();
BufferedReader bufReader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
String line;
while ((line = bufReader.readLine()) != null) {
result += line;
}
//JSON string is returned
return result;
C#(.NET):
//Request url
string url = "http://cloud.assetscontrols.com:8092/OpenApi/LBS";
//Request parameters, JSON format parameters, it is recommended to pass in objects
string body = "{FAction:\"QueryLBSTrackListByFGUID\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUID:\"BE2A1E27-B36E-4301-B2C8-465A62AD215F\",FType:\"1\",FStartTime:\"2020-08-05 16:00:00\",FEndTime:\"2020-08-12 15:59:59\",FAssetTypeID:\"701\",FLanguage:\"1\",FDateType:\"0\"}";
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "post";
request.Accept = "*/*";
request.ContentType = "application/json";
request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
byte[] buffer = encoding.GetBytes(body);
request.ContentLength = buffer.Length;
request.GetRequestStream().Write(buffer, 0, buffer.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
{
//JSON string is returned
return reader.ReadToEnd();
}
Python:
url = 'http://cloud.assetscontrols.com:8092/OpenApi/LBS'
data = {
'FAction': 'QueryLBSTrackListByFGUID',
'FTokenID': '3acef045-d302-4032-b40a-d9ee6c1519cd',
'FGUID':'BE2A1E27-B36E-4301-B2C8-465A62AD215F',
'FType':1,
'FStartTime':'2020-08-05 16:00:00',
'FEndTime':'2020-08-12 15:59:59',
'FAssetTypeID':'701',
'FLanguage':'1',
'FDateType':0
}
data = parse.urlencode(data).encode('utf-8')
headers = {
'User-Agent': r'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) '
r'Chrome/45.0.2454.85 Safari/537.36 115Browser/6.0.3',
'Connection': 'keep-alive'
}
req = request.Request(url, headers=headers, data=data)
page = request.urlopen(req).read()
page = page.decode('utf-8')
# json_array = json.loads(page)
return page;
文档更新时间: 2024-12-19 16:52 作者:Jeson