Select to view content in your preferred language

Filter AGOL Feature Services by recently edited/added features

201
1
07-20-2025 11:51 PM
FMGLGIS
Regular Contributor

Hi, does the community have any suggestions on ways to filter feature services by recent data edits (add/delete/update), rather than metadata/tag edits?

Goal is to identify items that have edits applied recently rather than just views/requests. Experimenting with the reporting tools currently, hoping to avoid enabling editor tracking and using the python route but might be the most reliable way.

Cheers!

0 Kudos
1 Reply
ChristopherCounsell
MVP Frequent Contributor

Try lasteditdate

https://developers.arcgis.com/rest/services-reference/enterprise/layer-feature-service/

from arcgis.gis import GIS

from arcgis.features import FeatureLayerCollection

import datetime

 

gis = GIS("home")

flc = FeatureLayerCollection('https://services.arcgis.com/xyz/arcgis/rest/services/YourLayer/FeatureServer', gis)

layer = flc.layers[0]

edit_timestamp = layer.properties.editingInfo['lastEditDate'] / 1000

edit_datetime = datetime.datetime.utcfromtimestamp(edit_timestamp)

 

print(f"Last data edit: {edit_d

atetime}")

 

0 Kudos