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
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. |
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"
},
{
"PointId": "5484",
"PointName": "Garage"
},
..........
]
}
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.