Description:
- Check if the device is inside the designated fence
Version:
Ver. |
Maker |
Established Date |
Revision Date |
1.0.0 |
lenny |
2023-06-19 |
|
Request URL:
Request Method:
Request Header:
Parameter Name |
Whether Must |
Type |
Instructions |
Content-Type |
Yes |
string |
Request Type: x-www-form-urlencoded |
Request Parameter:
Parameter Name |
Whether Must |
Type |
Instructions |
gpsLockNo |
Yes |
string |
device no |
geoFence |
Yes |
string |
fence guid |
fTokenID |
Yes |
string |
Token |
Return Example:
Return when correct:
{
"Result": 200,
"Message": "inside the fence",
"FObject": null
}
Return on error:
{
"Result": 105,
"Message": "Fail:gpsLockNo or geoFence is null",
"FObject": null
}
{
"Result": 105,
"Message": "outside the fence",
"FObject": null
}
{
"Result": 105,
"Message": "Fail:token error or timeout",
"FObject": null
}
Return Parameter Description:
Parameter Name |
Type |
Instructions |
Request Example:
String result = "";
String url ="http://icloud.assetscontrols.com:8092/api/AscentPH/CheckDeviceInGeoFence?gpsLockNo=8041602692&geoFence=dfd0d889-7a01-4cd4-b8ed-88825c5fb72b&fTokenID=DB7F20D9-84C3-44C3-B05A-06A9C392A189";
HttpPost post = new HttpPost(url);
CloseableHttpClient client = HttpClients.createDefault();
HttpResponse response = client.execute(post);
HttpEntity entity = response.getEntity();
String result = EntityUtils.toString(entity, "UTF-8");
return result;
文档更新时间: 2023-06-20 14:03 作者:刘家帅