Select to view content in your preferred language

Issue updating itemInfo for Feature Service using API

88
2
a week ago
Labels (1)
jhatch1
New Contributor

I'm trying to update the itemInfo for a feature service using the ArcGIS python API. But it isn't updating for some reason. When I try,

portal = arcgis.gis.GIS('[login_creds]')
item = portal.content.get('[feature_service_id]')
item.update(item_properties={'name':'Updated name', 'culture':'en-us'"})

The culture item updated, but not the name? Any ideas why. Then I found this, and thought maybe the name tag wasn't correct above. So I tried,

portal = arcgis.gis.GIS('[login_creds]')
item = portal.content.get('[feature_service_id]')
item.update(item_properties={'namegt':'Updated name', 'culture':'en-us'"})

But still nothing.

 

 

0 Kudos
2 Replies
CodyPatterson
MVP Regular Contributor

Hey @jhatch1 

Would this be the right way here? I think it's supposed to be title rather than name:

portal = arcgis.gis.GIS('[login_creds]')
item = portal.content.get('[feature_service_id]')
item.update(item_properties={'title':'Updated name', 'culture':'en-us'"})

https://developers.arcgis.com/documentation/portal-and-data-services/portal-service/content-items/ma...

https://developers.arcgis.com/python/latest/samples/using-and-updating-GIS-content/

Cody

0 Kudos
jhatch1
New Contributor

@CodyPatterson, thanks!

But I want to update the name and not the title. These are separate item properties, see https://developers.arcgis.com/rest/enterprise-administration/server/iteminfo/.

0 Kudos