PointList
- This method contains the latest, most up-to-date list of PointIDs and associated Point/Geofence Names
-
Returns two pieces of information:
- AutoGuard Unique Point Identification number
- Point/Geofence common Name (ex. Main Office, Warehouse…)
Use Case
- Use to query the PointID and associated Point/Geofence Name
- Point/Geofence Names can change but PointID will never change
Use an HTTP GET request to obtain your list of Points:
[GET] https://secure.autoguardtracking.com/WebApi/api/v2.0/PointList?isLatLon={isLatLon}&isPointAddress={isPointAddress}
Request Header
The request header should contain the API Access Token obtained from the authentication process. Get Access Token.
| Header Name | Description |
|---|---|
| Authorization | Access Token obtained from the 1st step's authentication process. |
URL Parameter
If you want to receive Lat Lon and PointAddress of a point, the URL should contain the isLatLon and isPointAddress parameter below.
| Parameter Name | Description | Value Format | Example |
|---|---|---|---|
| isLatLon (Optional) | "True" returns Lat Lon | true or false | true |
| isPointAddress (optional) | "True" returns Point Address | true or false | true |
Create PointList Object
Below is the PointList request API examples:
var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization","Bearer YOUR_API_TOKEN")
var response = await client.GetAsync("https://secure.autoguardtracking.com/WebApi/api/v2.0/PointList");
var responseString = await response.Content.ReadAsStringAsync();
//responseString will contain the response in JSON format
$.ajax({
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
},
type: "GET",
url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/PointList",
dataType: "json",
success: function(data){
//data object will contain the result as a JSON object
}
});
Sample PointList Object
$.ajax({
beforeSend: function(xhrObj){
xhrObj.setRequestHeader("Authorization","Bearer YOUR_API_TOKEN");
},
type: "GET",
url: "https://secure.autoguardtracking.com/WebApi/api/v2.0/PointList",
dataType: "json",
success: function(data){
//data object will contain the result as a JSON object
}
});
A successful request will return the following JSON result:
{
"StatusCode": "200",
"Message": "OK",
"Data":[
{
"PointId": "5655",
"PointName": "Office",
"Lat": 41.6704,
"Lon": -88.0106,
"PointAddress": "1011 STATE STREET, ILLINOIS AND MICHIGAN CANAL, LEMONT, IL 60439, USA"
},
{
"PointId": "5484",
"PointName": "Garage",
"Lat": 41.4269,
"Lon": -87.3727,
"PointAddress": "909 PRATT STREET"
},
..........
]
}
Test
Test the PointList using your AccessToken by entering it below:
Clicking the test button will send a request to the AutoGuard API and display the result below.