arcgis.apps.tracker module¶
The LocationTrackingManager is the main entry point into the Tracker module.
It can be used as shown in the following code example.
# Access the location tracking manager and check the status
import arcgis
gis = arcgis.gis.GIS("https://arcgis.com", "<username>", "<password>")
print(gis.admin.location_tracking.status)
LocationTrackingManager¶
- 
class 
arcgis.apps.tracker.LocationTrackingManager(gis)¶ This manages Location Tracking for an organization. It can be accessed from the gis as
location_trackingAdditional information can be found here: https://doc.arcgis.com/en/tracker/help/configure-location-tracking.htm
Argument
Description
gis
Required
GIS. The GIS to configure location tracking for.- 
create_track_view(title)¶ This creates a
TrackView.Argument
Description
title
Required
StringThe title of the Track View to create.- Returns
 
- 
disable()¶ Disables location tracking for the organization.
THIS WILL DELETE ALL LOCATION TRACKING VIEWS, SERVICES, AND DATA.
- Returns
 True if successful, False otherwise
- 
enable(tracks_layer_shards=6, lkl_layer_shards=3, tracks_layer_rolling_index_strategy='Monthly')¶ Enables location tracking for the organization.
Argument
Description
tracks_layer_shards
The number of shards to use for the tracks layer. This only applies for ArcGIS Enterprise.
lkl_layer_shards
The number of shards to use for the last known location layer. This only applies for ArcGIS Enterprise.
tracks_layer_rolling_index_strategy
The rolling index strategy for the tracks layer [“Daily”, “Weekly”, “Monthly”, “Yearly”, “Decade”, “Century”] This only applies for ArcGIS Enterprise.
- Returns
 True if successful, False otherwise
- 
property 
last_known_locations_layer¶ The last known locations
FeatureLayer
- 
pause()¶ Pauses location tracking for the organization.
- Returns
 True if successful, False otherwise
- 
resume()¶ Resumes location tracking for the organization after it was paused.
- Returns
 True if successful, False otherwise
- 
property 
retention_period¶ The retention period of the Location Tracking Tracks Layer. This is a positive integer whose units are defined by
retention_period_units
- 
property 
retention_period_enabled¶ A boolean indicating if the retention period is enabled
- 
property 
retention_period_units¶ The retention period units (“HOURS”, “DAYS”, “MONTHS”, “YEARS”) of the Location Tracking Tracks Layer
- 
property 
status¶ The status of location tracking (“disabled”, “paused”, “enabled”)
- 
property 
tracks_layer¶ The tracks
FeatureLayer
- 
 
TrackView¶
- 
class 
arcgis.apps.tracker.TrackView(item)¶ A Track View
Argument
Description
item
Required
Item. The item that represents the Track View.# Get a Track View and list mobile users. import arcgis gis = arcgis.gis.GIS("https://arcgis.com", "<username>", "<password>") item = gis.content.get("<item-id>") track_view = arcgis.apps.tracker.TrackView(item) mobile_users = track_view.mobile_users.list()
- 
delete()¶ Deletes the Track View, including the group and view service.
- 
property 
group¶ The group that contains the Track Viewers and Layers
- 
property 
last_known_locations_layer¶ The last known locations
FeatureLayer
- 
property 
mobile_users¶ The
MobileUserManagerfor the Track View
- 
property 
tracks_layer¶ The tracks
FeatureLayer
- 
property 
viewers¶ The
TrackViewerManagerfor the Track View
- 
 
TrackViewerManager¶
- 
class 
arcgis.apps.tracker.TrackViewerManager(track_view)¶ A class that manages the Track Viewers in the Track View.
It can be accessed from the TrackView as
viewersArgument
Description
track_view
Required
TrackView. The Track View to configure Track Viewers for.- 
add(viewers)¶ Adds the specified usernames as Track Viewers
Argument
Description
viewers
Required
ListofStringorarcgis.gis.User. The list of usernames/users to add as Track Viewers.
- 
delete(viewers)¶ Argument
Description
viewers
Required
ListofStringorarcgis.gis.User. The list of usernames/users to remove as Track Viewers.
- 
list()¶ Lists all of the Track Viewers
- Returns
 ListofStringrepresenting usernames
- 
 
MobileUserManager¶
- 
class 
arcgis.apps.tracker.MobileUserManager(track_view)¶ A class that manages the Mobile Users in the Track View.
It can be accessed from the TrackView as
mobile_usersArgument
Description
track_view
Required
TrackView. The Track View to configure Mobile Users for.- 
add(users)¶ Adds the specified usernames as Mobile Users
Argument
Description
users
Required
ListofStringorarcgis.gis.User. The list of usernames/users to add as Mobile Users
- 
delete(users)¶ Argument
Description
users
Required
ListofStringorarcgis.gis.User. The list of usernames/users to remove as Mobile Users.
- 
list()¶ Lists all of the Track Viewers
- Returns
 ListofStringrepresenting usernames
- 
property 
view_definition_query¶ The View Definition Query of the tracks layer
-