Brief description:
- Query specific information of a single route,include collection of branch routes
 
Interface version:
| Version Number | Developer | Date of Development | Date of Revision | 
|---|---|---|---|
| 1.0.0 | lenny | 2024-12-24 | 2024-12-24 | 
Request URL:
- http://icloud.assetscontrols.com:8092/OpenApi/Admin
 - https://icloud.assetscontrols.com:3443/OpenApi/Admin
 
Request Method:
| Parameter Name | Required | Type | Description | 
|---|---|---|---|
| Content-Type | Required | string | Request Type: application/json | 
Request Parameters:
| Parameter Name | Required | Type | Description | 
|---|---|---|---|
| FTokenID | Yes | string | Token ID | 
| FAction | Yes | string | Method Name (QueryAllRoutePlanByFGUID ) | 
| FGUID | Yes | string | Route unique identifier-FRouteGUID | 
Return Example:
When correct, it returns:
{
    "Result": 200,
    "Message": "check token success",
    "FObject": {
        "Table": [
            {
                "FGUID": "1e8ea88a-60f3-42bc-8176-37c676b677d8",
                "FName": "3432",
                "FCode": "001",
                "FStartFence": "dfd0d889-7a01-4cd4-b8ed-88825c5fb72b",
                "FStartFenceName": "543543",
                "FStartFormType": 2,
                "FStartTypeName": "534534",
                "FStartPath": "[]",
                "FStartRadius": 500.0,
                "FStartCenterLon": 113.92131186,
                "FStartCenterLat": 22.67073578,
                "FEndFence": "a156ffcf-9285-4756-95f1-0cb830fdae2a",
                "FEndFenceName": "534546",
                "FEndFormType": 1,
                "FEndTypeName": "543543",
                "FEndPath": "[{\"lat\":22.54519516,\"lng\":113.89590926},{\"lat\":22.53213027,\"lng\":113.89155722},{\"lat\":22.53244843,\"lng\":113.9106911},{\"lat\":22.54478113,\"lng\":113.90775015}]",
                "FEndRadius": 0.0,
                "FEndCenterLon": 113.90137618,
                "FEndCenterLat": 22.53813873,
                "FRoadPoints": "[{\"lat\":22.67123239,\"lng\":113.92147994},{\"lat\":22.67109185,\"lng\":113.92189991},{\"lat\":22.67097135,\"lng\":113.92223909},{\"lat\":22.67084065,\"lng\":113.92266904},{\"lat\":22.67073004,\"lng\":113.92301921}},{\"lat\":22.5381929,\"lng\":113.90218871}]",
                "FRemark": "",
                "FIsMainRoute": 1,
                "FRoutePassInfo": [
                    {
                        "FRouteGUID": "1e8ea88a-60f3-42bc-8176-37c676b677d8",
                        "FPassFenceGUID": "6c19e0c2-b36c-48d3-a1be-cba35f0dcc35",
                        "FName": "AEE",
                        "FArea": 785000.0,
                        "FFormType": 2,
                        "FTypeName": "343",
                        "FPath": "[]",
                        "FRadius": 500.0,
                        "FCenterLon": 113.91507376,
                        "FCenterLat": 22.65319852,
                        "FIndex": 1
                    }
                ]
            }
        ],
        "Table2": [
            {
                "FGUID": "f22a64b3-35fa-401a-b46d-12dea683326f",
                "FName": "534",
                "FCode": "20250728003",
                "FStartFence": "dfd0d889-7a01-4cd4-b8ed-88825c5fb72b",
                "FStartFenceName": "5345",
                "FStartFormType": 2,
                "FStartTypeName": "etre",
                "FStartPath": "[]",
                "FStartRadius": 500.0,
                "FStartCenterLon": 113.92131186,
                "FStartCenterLat": 22.67073578,
                "FEndFence": "a156ffcf-9285-4756-95f1-0cb830fdae2a",
                "FEndFenceName": "5435",
                "FEndFormType": 1,
                "FEndTypeName": "6546",
                "FEndPath": "[{\"lat\":22.54519516,\"lng\":113.89590926},{\"lat\":22.53213027,\"lng\":113.89155722},{\"lat\":22.53244843,\"lng\":113.9106911},{\"lat\":22.54478113,\"lng\":113.90775015}]",
                "FEndRadius": 0.0,
                "FEndCenterLon": 113.90137618,
                "FEndCenterLat": 22.53813873,
                "FRoadPoints": "[{\"lat\":22.67053234,\"lng\":113.92123008},{\"lat\":22.67044206,\"lng\":113.92149997},{\"lat\":22.67027167,\"lng\":113.92194974},{\"lat\":22.67023145,\"lng\":113.92214964},{\"lat\":22.67023145,\"lng\":113.92214964}}]",
                "FRemark": "test",
                "FIsMainRoute": 0,
                "FRoutePassInfo": [
                    {
                        "FRouteGUID": "f22a64b3-35fa-401a-b46d-12dea683326f",
                        "FPassFenceGUID": "cd599f34-a408-4c20-8aab-6a9f246afc6d",
                        "FName": "56423423",
                        "FArea": 8998000.0,
                        "FFormType": 1,
                        "FTypeName": "343243",
                        "FPath": "[{\"lat\":22.74129463,\"lng\":113.95127929},{\"lat\":22.7344746,\"lng\":113.94214189},{\"lat\":22.72191399,\"lng\":113.93294184},{\"lat\":22.71563635,\"lng\":113.95853057},{\"lat\":22.7350435,\"lng\":113.98881357}]",
                        "FRadius": 0.0,
                        "FCenterLon": 113.95822878,
                        "FCenterLat": 22.7290518,
                        "FIndex": 1
                    }
                ]
            } 
        ]
    }
}
Error returns:
// Indicates that the incoming object is empty, which should be due to incorrect data format
{
    "Result": 102,
    "Message": "FParam is null",
    "FObject": []
}
//Indicates token expiration or error.
{
    "Result": 104,
    "Message": "token error or timeout",
    "FObject": []
}
//Indicates that there is an exception error
{
    "Result": 105,
    "Message": "fail",
    "FObject": null
}
Return parameter Table description:
| Parameter Name | Type | Description | 
|---|---|---|
| FAgentGUID | String | Unique company identifier | 
| FGUID | String | Route unique identifier- | 
| FName | String | Route Name | 
| FCode | String | Route Code | 
| FStartFence | String | Starting Fence Unique identifier | 
| FStartFenceName | String | Starting fence name | 
| FStartFormType | int | Starting fence type 1: Polygon 2: Circle | 
| FStartTypeName | String | Starting fence type name | 
| FStartPath | String | Starting fence point set, Json string | 
| FStartRadius | double | Starting Fence Radius | 
| FStartCenterLon | String | Starting fence center point longitude | 
| FStartCenterLat | String | Starting fence center point latitude | 
| FEndFence | String | End fence unique identifier | 
| FEndFenceName | String | End fence Name | 
| FEndFormType | int | End Fence Type 1: Polygon 2: Circle | 
| FEndTypeName | String | End Fence Type Name | 
| FEndPath | String | End fence point set, Json string | 
| FEndRadius | double | End Fence Radius | 
| FEndCenterLon | String | End fence center point longitude | 
| FEndCenterLat | String | End fence center point latitude | 
| FRoadPoints | String | A collection of all points on the route, a Json string | 
| FRemark | String | Route Description | 
| FIsMainRoute | int | Is main route 1:Yes 0:No | 
| FRoutePassInfo | Object | All Check Point fences. If null, it means that the route does not Check Point fence | 
Return parameter FRoutePassInfo
| Parameter name | Type | Description | 
|---|---|---|
| FRouteGUID | String | Unique identifier of the route | 
| FPassFenceGUID | String | Unique identifier of Check Point fence | 
| FName | String | Check Point fence name | 
| FFormType | int | Fence Type 1: Polygon 2: Circle | 
| FTypeName | String | Fence Type Name | 
| FPath | String | Fence point collection, Json string | 
| FRadius | double | Starting Fence Radius | 
| FCenterLon | String | Start fence center point longitude | 
| FCenterLat | String | Start fence center point Latitude | 
| FIndex | int | Check Point fence index | 
Return parameter Table1 is branch route, If null, it means that the route does not exist
Remarks:
- Additional error codes are as follows:
 - 102: Incorrect request parameters
 - 104: Token has expired
 - 105: Indicates that an exception has occurred.
 
Request Example:
Java:
String result = "";
// Request URL
String url = "http://cloud.assetscontrols.com:8092/OpenApi/Admin";  
// Request parameters in JSON format. It is recommended to use an object to pass the parameter
String body = "{"FAction":"QueryAllRoutePlanByFGUID","FGUID":"e286fe13-2034-45eb-9da2-d929e8a2558a",  \"FTokenID\": \"ec51d691-d9a7-4f74-95a8-1856be2ae741\"}";
URL realUrl = new URL(url);
// Set the common properties of the 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");
// Sending a POST request requires the following two lines to be set
conn.setDoOutput(true);
conn.setDoInput(true);
PrintWriter pw = new PrintWriter(conn.getOutputStream());
// Send the request parameters
pw.print(body);
// Flush output stream buffer
pw.flush();   
// Define BufferedReader to read the response from the URL
BufferedReader bufReader = new BufferedReader(new InputStreamReader(conn.getInputStream()));  
// Read the response from the URL using the BufferedReader input stream
String line;
while ((line = bufReader.readLine()) != null) {
     result += line;        
 }
// The response is in the form of a JSON string
return result;C#:
// Request URL
string url = "http://cloud.assetscontrols.com:8092/OpenApi/Admin";  
// Request parameters in JSON format. It is recommended to use an object to pass the parameter
string body = "{"FAction":"QueryAllRoutePlanByFGUID","FGUID":"e286fe13-2034-45eb-9da2-d929e8a2558a",  \"FTokenID\": \"ec51d691-d9a7-4f74-95a8-1856be2ae741\"}"; 
Encoding encoding = Encoding.UTF8;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
// Request method: post / get
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))
{
     // The response is in the form of a JSON string
    return reader.ReadToEnd();
}Python:
url = 'http://cloud.assetscontrols.com:8092/OpenApi/Admin'
      data = {
        'FAction': 'QueryAllRoutePlanByFGUID',
        'FTokenID': 'ec51d691-d9a7-4f74-95a8-1856be2ae741',
        'FGUID': 'e286fe13-2034-45eb-9da2-d929e8a2558a' 
       }
      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;文档更新时间: 2025-09-18 16:50   作者:刘家帅