The ItemProperties class introduced as of API version 2.3.0 does not seem to work when updating an Item object, or perhaps I am missing something? Any help greatly appreciated.
The documentation for the ItemProperties states that the title and item_type parameters are required, why would you need these if you are updating and item? I can understand if using an add() method.
Anyway, I have failed in attempts to use the ItemProperties to update and Item.
"""set the tags property for the item properties"""
item_properties = ItemProperties(
title = item.title,
item_type = item.type,
tags = tags
)
"""perform the update on the item object"""
status = item.update(
item_properties = item_properties
)
print(status)
I also attempted to add the parameter overwrite = True to no affect. I get the following error.
TypeError: argument of type 'ItemProperties' is not iterable
Has anyone successfully used the ItemProperties with an update() or is this an actual bug?
Cheers,
Glen
Hello!
Did you ever find a solution for this?
I wonder if you are creating the wrong object for the update() method on the item object?
If you look at the documentation for the Item.update() method:
arcgis.gis module | ArcGIS API for Python
...you will notice that the item_properties argument requires a Python dictionary and not an ItemProperties object which you are creating.
The key : value descriptions for the item_properties dictionary are underneath parameter list for the method.
I hope this helps!?
many thanks ed