Select to view content in your preferred language

Date Updated in Open Data Script

155
1
Jump to solution
04-08-2025 09:57 AM
MeleKoneya
Frequent Contributor

Good morning,

Our Open Data portal shows the Date Updated when the last time our Hosted Feature Layers were updated and not the date of the data.

I had Notebook at one time that would update this date to show our data is dynamically updated weekly but can't find it.

Does anyone have a sample of how to update this value?      We can't currently use editor tracking fields so I would like script that does it to show the users our data is updated frequently.

Thank you

0 Kudos
1 Solution

Accepted Solutions
MeleKoneya
Frequent Contributor

This is how I was able to update the data via python

#connect to GIS
from arcgis.gis import GIS
gis = GIS("https://website.maps.arcgis.com/", "UserName", "**********")

 

#Get user that owns folder
user = gis.users.get("UserName")

 

#Get list of items
list = user.items(folder='Open Data')

 

for i in list:
    i.update(item_properties = {'accessInformation': "COS"})

 

Updating the accessinformation sets the updated date to today

View solution in original post

0 Kudos
1 Reply
MeleKoneya
Frequent Contributor

This is how I was able to update the data via python

#connect to GIS
from arcgis.gis import GIS
gis = GIS("https://website.maps.arcgis.com/", "UserName", "**********")

 

#Get user that owns folder
user = gis.users.get("UserName")

 

#Get list of items
list = user.items(folder='Open Data')

 

for i in list:
    i.update(item_properties = {'accessInformation': "COS"})

 

Updating the accessinformation sets the updated date to today

0 Kudos