Select to view content in your preferred language

Super Basic - Update 'Credits' with arcgis api for python?

463
3
Jump to solution
11-17-2023 07:03 AM
Labels (2)
RandyMcGregor_BMcD
New Contributor III

I am trying to update the 'Credits' property (feature services and views) using arcgis api for python and I have had no luck. I've tried 'update' on the item and 'update_definition' on the flc and I don't see a 'credits' property. Can someone explain who this is done? I can do rudimentary jupyter notebooking, but haven't been able to find the correct property.

RandyMcGregor_BMcD_0-1700233282614.png

Thank you,

Randy McGregor

 

0 Kudos
1 Solution

Accepted Solutions
twangtx
New Contributor II

Hi Randy,

This should do it.

fs = gis.content.get([the itemID])
fs.update(item_properties = {'accessInformation': " Micheal, Catherine, Amanda"})

Other parameters that you can update are here: https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#item, search for "update(item_properties=Nonedata=Nonethumbnail=Nonemetadata=None)"

Just make sure the account you're signed in as in Pro is the owner of the item in AGO.

View solution in original post

0 Kudos
3 Replies
twangtx
New Contributor II

Hi Randy,

This should do it.

fs = gis.content.get([the itemID])
fs.update(item_properties = {'accessInformation': " Micheal, Catherine, Amanda"})

Other parameters that you can update are here: https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#item, search for "update(item_properties=Nonedata=Nonethumbnail=Nonemetadata=None)"

Just make sure the account you're signed in as in Pro is the owner of the item in AGO.

0 Kudos
RandyMcGregor_BMcD
New Contributor III

Oh my gosh. I would not have thought 'accessInformation' is the property for 'Credits (Attribution).' Thank you. That did it.

0 Kudos
twangtx
New Contributor II

You're very welcome!

0 Kudos