The Geofence method allows you to access information specific to the Geofences (Geofence or Radius zones) associated with your account.
This method only supports GET and is primarily used to retrieve GeofenceIDs (aka ZoneIDs) to use in the /TimeInZoneByFenceReport API call.
This is the Geofence-side counterpart to /ZoneAlert. /ZoneAlert lists the zones that have an Alert set up on them and identifies each one by its AlertId; /Geofence lists the Geofences themselves and identifies each one by its GeofenceId. A Geofence exists whether or not anyone has set an Alert up on it, so this list can be longer than /ZoneAlert's.
GeofenceIds and AlertIds are separate ID sequences Á the same number will generally refer to two unrelated zones. Use GeofenceIds with /TimeInZoneByFenceReport and AlertIds with /TimeInZoneReport.
The following datatype will be JSONified and returned for methods which retrieve Geofence values.
Polyfence zones return Points and leave Radius, Latitude and Longitude null. Radius zones return Radius (in meters), Latitude and Longitude, and leave Points null.
| public | UInt64 | GeofenceId; | // A unique identifier for the Geofence, aka ZoneID or PolyfenceID. Use this when making further API calls specific to this Geofence, such as TimeInZoneByFenceReport. This is NOT an AlertId. |
| public | String | GeofenceName; | // The name of this Geofence. |
| public | String | GeofenceType; | // The Type of this Geofence. Polyfence or Radius. |
| public | Double[][] | Points; | // (Polyfence Geofence only) This is a list of lat/long points that defines a polygonal geofence zone. Will be NULL for Radius Zones. |
| public | Double? | Radius; | // (Radius Geofence only) This is the distance, in meters, from the center of a circular geofence. Will be NULL for Polyfence Zones. |
| public | Double? | Latitude; | // (Radius Geofence only) The Latitude value of the center point. Will be NULL for Polyfence Zones. |
| public | Double? | Longitude; | // (Radius Geofence only) The Longitude value of the center point. Will be NULL for Polyfence Zones. |
| public | String | ZoneColor; | // The color value of the Zone (as shown in Web Application) |
The following list provides a reference for all valid /Geofence HTTP requests.
Summary: Return USFT's information about all Geofences (Geofence/Radius zones) viewable by your Account. This is the Geofence-side counterpart to ZoneAlert. ZoneAlert lists zones that have an active Alert set up on them and identifies each by AlertId; this method lists the Geofences themselves and identifies each by GeofenceId, so zones with no Alert attached are included. Use the GeofenceId returned here with TimeInZoneByFenceReport.
Returns: A list of all Geofences viewable by your Account
Parameters:
- account: (Optional) If this parameter is included, the method will be run on behalf of the specified child Account (if valid) (FromUri)