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.
- Log in to ArcGIS Online and click Groups > My Groups.
- Browse to and click the group of the tracking sharing.
- Under Recently added content or Featured group content, browse to and click the hosted feature layer.
- On the item details page, scroll down to the bottom of the page. In the URL section, click View.

- In the ArcGIS REST Services Directory, under Layers, right-click Tracks and select Open link in new tab.

- 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.

- On the Delete Features: Tracks (ID: 0) page, configure the Delete Features operation.
- For Where, type created_user in ('<username>').
Note: For more information on the clauses used in this workflow, refer to ArcGIS Online: Deleting tracks.
- For Rollback on Failure, click False.
- For Return Delete Results, click False.
- For ASync, click True.
- Click Delete Features.

- Click the link in statusURL.

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

Related Information
- ArcGIS Tracker: Can I delete track points from the location tracking layer?
- ArcGIS Online: Deleting tracks
- ArcGIS REST APIs: Delete Features
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