Summary:
- Query slave track
Version:
No. | Editor | Edit date | Revision date |
---|---|---|---|
2.0.0 | admin | 2020-08-20 | 2020-08-20 |
Request URL:
- http://icloud.jointcontrols.com:8092/OpenApi/Report
- https://icloud.assetscontrols.com:3443/OpenApi/Report
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 | QueryReportSubAssetTrack |
FGUID | yes | string | Unique identification of assets / device |
FSelectType | yes | int | 1:Query by assets;0:Query by device |
FStartTime | yes | datetime | Start time(UTC) |
FEndTime | yes | datetime | End time(UTC) |
Response example:
Correct response:
{
"Result": 200,
"Message": "check token success",
"FObject": [
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:11:27",
"FRecvTime": "2020-08-24T05:12:36",
"FLongitude": 113.916800,
"FLatitude": 22.580777,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:01:01Z\",\"FDateTimestamp\":1598241661000,\"FEvent\":6,\"FFlowId\":0,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":117,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:11:27",
"FRecvTime": "2020-08-24T05:14:39",
"FLongitude": 113.916800,
"FLatitude": 22.580777,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:01:01Z\",\"FDateTimestamp\":1598241661000,\"FEvent\":6,\"FFlowId\":0,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":117,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:11:27",
"FRecvTime": "2020-08-24T05:17:43",
"FLongitude": 113.916800,
"FLatitude": 22.580777,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:01:01Z\",\"FDateTimestamp\":1598241661000,\"FEvent\":6,\"FFlowId\":0,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":117,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:11:27",
"FRecvTime": "2020-08-24T05:19:45",
"FLongitude": 113.916800,
"FLatitude": 22.580777,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:01:01Z\",\"FDateTimestamp\":1598241661000,\"FEvent\":6,\"FFlowId\":0,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":117,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:41:37",
"FRecvTime": "2020-08-24T05:41:58",
"FLongitude": 113.917333,
"FLatitude": 22.581298,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:31:21Z\",\"FDateTimestamp\":1598243481000,\"FEvent\":6,\"FFlowId\":1,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":118,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:41:37",
"FRecvTime": "2020-08-24T05:46:04",
"FLongitude": 113.917333,
"FLatitude": 22.581298,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:31:21Z\",\"FDateTimestamp\":1598243481000,\"FEvent\":6,\"FFlowId\":1,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":118,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:41:37",
"FRecvTime": "2020-08-24T05:49:08",
"FLongitude": 113.917333,
"FLatitude": 22.581298,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:31:21Z\",\"FDateTimestamp\":1598243481000,\"FEvent\":6,\"FFlowId\":1,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":118,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T05:11:27",
"FRecvTime": "2020-08-24T05:11:35",
"FLongitude": 113.916800,
"FLatitude": 22.580777,
"FSpeed": 0,
"FSubInfo": "{\"E0171A0107\":{\"FAssetID\":\"E0171A0107\",\"FDateTime\":\"2020-08-24T04:01:01Z\",\"FDateTimestamp\":1598241661000,\"FEvent\":6,\"FFlowId\":0,\"FHumidity\":0,\"FLockRope\":0,\"FLockStatus\":0,\"FLockTimes\":1038,\"FPower\":68,\"FRSSI\":117,\"FSensorType\":4,\"FTemperature\":-1000.0,\"FVoltage\":\"3.93\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T06:25:12",
"FRecvTime": "2020-08-24T06:25:40",
"FLongitude": 113.917333,
"FLatitude": 22.580717,
"FSpeed": 0,
"FSubInfo": "{\"1018330094\":{\"FAssetID\":\"1018330094\",\"FDateTime\":\"2020-08-23T16:22:29Z\",\"FDateTimestamp\":1598199749000,\"FEvent\":-1,\"FFlowId\":236,\"FHumidity\":75,\"FLockRope\":1,\"FLockStatus\":1,\"FLockTimes\":-1,\"FPower\":96,\"FRSSI\":97,\"FSensorType\":1,\"FTemperature\":28.3,\"FVoltage\":\"3.00\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T06:25:12",
"FRecvTime": "2020-08-24T06:26:40",
"FLongitude": 113.917333,
"FLatitude": 22.580717,
"FSpeed": 0,
"FSubInfo": "{\"1018330094\":{\"FAssetID\":\"1018330094\",\"FDateTime\":\"2020-08-23T16:22:29Z\",\"FDateTimestamp\":1598199749000,\"FEvent\":-1,\"FFlowId\":236,\"FHumidity\":75,\"FLockRope\":1,\"FLockStatus\":1,\"FLockTimes\":-1,\"FPower\":96,\"FRSSI\":97,\"FSensorType\":1,\"FTemperature\":28.3,\"FVoltage\":\"3.00\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T06:25:12",
"FRecvTime": "2020-08-24T06:27:42",
"FLongitude": 113.917333,
"FLatitude": 22.580717,
"FSpeed": 0,
"FSubInfo": "{\"1018330094\":{\"FAssetID\":\"1018330094\",\"FDateTime\":\"2020-08-23T16:22:29Z\",\"FDateTimestamp\":1598199749000,\"FEvent\":-1,\"FFlowId\":236,\"FHumidity\":75,\"FLockRope\":1,\"FLockStatus\":1,\"FLockTimes\":-1,\"FPower\":96,\"FRSSI\":97,\"FSensorType\":1,\"FTemperature\":28.3,\"FVoltage\":\"3.00\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T06:25:12",
"FRecvTime": "2020-08-24T06:29:46",
"FLongitude": 113.917333,
"FLatitude": 22.580717,
"FSpeed": 0,
"FSubInfo": "{\"1018330094\":{\"FAssetID\":\"1018330094\",\"FDateTime\":\"2020-08-23T16:22:29Z\",\"FDateTimestamp\":1598199749000,\"FEvent\":-1,\"FFlowId\":236,\"FHumidity\":75,\"FLockRope\":1,\"FLockStatus\":1,\"FLockTimes\":-1,\"FPower\":96,\"FRSSI\":97,\"FSensorType\":1,\"FTemperature\":28.3,\"FVoltage\":\"3.00\"}}"
},
{
"FAssetGUID": "8e762610-ed26-4974-ac04-87710890e8ab",
"FAssetID": "7500313618",
"FGPSTime": "2020-08-24T06:25:12",
"FRecvTime": "2020-08-24T06:30:47",
"FLongitude": 113.917333,
"FLatitude": 22.580717,
"FSpeed": 0,
"FSubInfo": "{\"1018330094\":{\"FAssetID\":\"1018330094\",\"FDateTime\":\"2020-08-23T16:22:29Z\",\"FDateTimestamp\":1598199749000,\"FEvent\":-1,\"FFlowId\":236,\"FHumidity\":75,\"FLockRope\":1,\"FLockStatus\":1,\"FLockTimes\":-1,\"FPower\":96,\"FRSSI\":97,\"FSensorType\":1,\"FTemperature\":28.3,\"FVoltage\":\"3.00\"}}"
}
]
}
Error response:
{
"Result": 102,
"Message": "Action is error",
"FObject": []
}
Return parameter description:
Parameter | Data type | Explanation |
---|---|---|
FAssetGUID | String | Unique identification of device |
FAssetID | String | Device Id |
FGPSTime | DateTime | Gps time |
FRecvTime | DateTime | Receive time |
FLongitude | Decimal | Longitude |
FLatitude | Decimal | Latitude |
FSpeed | Int | Speed (km/h) |
FSubInfo | String | slave information |
FSubAssetID | String | slave Id |
FSensorType | Int | slave type(1:JT126;4:JT709;5:JT801;6:JT802) |
FDateTime | DateTime | slave time |
FEvent | Int | event type |
FTemperature | String | Temperature |
FHumidity | String | Humidity |
FLockRope | Int | Lock rope state |
FLockStatus | Int | Lock state |
FLockTimes | Int | Unlock time |
FPower | Int | battery |
FVoltage | float | Voltage |
FRSSI | Int | RSSI |
Other result status description:
- 105:System exception
- 104:token error or expire
- 102:Parameter error
Examples:
Java:
String result = "";
String url = "http://cloud.assetscontrols.com:8092/OpenApi/Report";
String body = "{FAction:\"QueryReportSubAssetTrack\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUID:\"EABD84FC-0228-4836-A0A2-3404EC074A13\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\"}";
URL realUrl = new URL(url);
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;
}
return result;
C#(.NET):
string url = "http://cloud.assetscontrols.com:8092/OpenApi/Report";
string body = "{FAction:\"QueryReportSubAssetTrack\",FTokenID:\"3acef045-d302-4032-b40a-d9ee6c1519cd\",FGUID:\"EABD84FC-0228-4836-A0A2-3404EC074A13\",FSelectType:\"1\",FStartTime:\"2020-08-18 16:00:00\",FEndTime:\"2020-08-25 15:59:59\"}";
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))
{
return reader.ReadToEnd();
}
Python:
url = 'http://cloud.assetscontrols.com:8092/OpenApi/Report'
data = {
'FAction': 'QueryReportSubAssetTrack',
'FTokenID': '3acef045-d302-4032-b40a-d9ee6c1519cd',
'FGUID':'EABD84FC-0228-4836-A0A2-3404EC074A13',
'FSelectType':1,
'FStartTime':'2020-08-18 16:00:00',
'FEndTime':'2020-08-24 15:59:59',
}
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;
文档更新时间: 2023-12-01 10:13 作者:admin