English
Be The First To Get Support Updates
Want to know about the latest technical content and software updates?

How To: Delete tracks from the location sharing layer with ArcGIS REST API

Summary

ArcGIS Tracker is used to track the movement of mobile users. At times, the locations are deleted to reset the movement of the users or remove unnecessary tracks from the record. However, location sharing layers do not indicate the Delete Features capability in the feature layer definition. In ArcGIS Online, this is accomplished via ArcGIS REST API using the Delete Features operation. The workflow to delete tracks from the location sharing layer using the Delete Features operation in ArcGIS REST API is demonstrated in this article.

Procedure

Note:
The ability to delete tracks is restricted to administrators.
Note:
Deleting individual tracks directly is not supported in ArcGIS Online. Performing the following workflow deletes the tracks of the user entirely. 
  1. Log in to ArcGIS Online and click Groups > My Groups.
  2. Browse to and click the group of the tracking sharing.
  3. Under Recently added content or Featured group content, browse to and click the hosted feature layer.
  4. On the item details page, scroll down to the bottom of the page. In the URL section, click View.
The View button in the URL section.
  1. In the ArcGIS REST Services Directory, under Layers, right-click Tracks and select Open link in new tab.
The Tracks option under Layers.
  1. In the URL of the new tab generated, insert /deleteFeatures/ in between ‘0’ and the ‘?token’ section. The image below shows the deleteFeatures parameter appended to the URL.
The 'deleteFeatures' appended in the URL.
  1. On the Delete Features: Tracks (ID: 0) page, configure the Delete Features operation.
    1. For Where, type created_user in ('<username>').
Note:
For more information on the clauses used in this workflow, refer to ArcGIS Online: Deleting tracks.
  1. For Rollback on Failure, click False.
  2. For Return Delete Results, click False.
  3. For ASync, click True.
  4. Click Delete Features.
The Delete Features parameters configured on the Delete Features page.
  1. Click the link in statusURL.
The link for statusURL.

When 'Completed' is returned in Status, the tracks are deleted from the location sharing layer.

The Completed message displayed for Status in the Delete Features Status page.

Related Information

Last Published: 9/29/2022

Article ID: 000028200

Software: ArcGIS Tracker (iOS) 20.2.0, 20.1.0, 19.4.0, 19.3.1, 19.3.0, 19.2.0, 19.1.1, 19.1.0 ArcGIS Online Current