Deleting tracks from AGO

128
3
11-24-2020 11:12 AM
New Contributor

We are wanting to track Santa for our annual Parade Routes.  We want to delete our practice routes we created in Tracker and have tried the script in the AGO Notebook: 

https://host.domain.com/webadaptor/rest/services/Hosted/location_tracking/FeatureServer/0/deleteFeat...

Which results in a invalid syntax error.

Any suggestions or ideas? 

Reply
0 Kudos
3 Replies
Esri Regular Contributor

Can you post more information? Which notebook did you try? What errors are you seeing?

Reply
0 Kudos
New Contributor

ArcGIS Notebook Python 3 Standard 4.0

File "<ipython-input-5-0ec303b38de1>", line 1
SyntaxError: invalid syntax

 

Thank you for replying.

Reply
0 Kudos
New Contributor

We ended up using the code below:

layers=item.layers
layer = layers[0]
layer.delete_features (where = "Activity = 5")

Where Activity 5 is Automotive.

Alternatively to delete all values the where clause can be changed to where ObjectID > 0

Reply
0 Kudos