You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
With the old deprecated contentmanager add function, it was possible to create a new PortalItem from a dict.
With the latest versions of ArcGIS API for Python we need to do this using a Folder and a ItemProperties object
In this case I cannot use my dict and I need to initialize the ItemProperties object.
There is no option to convert my dict to ItemProperties object and a dict unpack doesn't work
Describe the solution you'd like
A ItemProperties.from_dict static function would be lovely
itemprops=ItemProperties.from_dict(item_dict)
Describe alternatives you've considered
Right now I just do a folder.add(item_dict) but this isn't officially supported according to the docs and for instance the tags are not set in a proper way
Additional context
Add any other context or screenshots about the feature request here.
@nanaeaubry
yes, I could do that, but when I save the JSON from portal to a local file, the property name is type and not item_type, so I (and every other user of the API) would have to do this modification everywhere and everytime we want to convert a local JSON to ItemProperties.
So this is why I would like to have a function instead, so that we can do the task with just one line of code and we don't have to think about remapping certain properties. And the remapping would be maintained by Esri, so if in the future another remap would be needed we as users shouldn't have to think of it at all.
Activity
nanaeaubry commentedon May 18, 2026
cc @achapkowski
In your dictionary you need to change the
typekeyword to beitem_typeinstead.PeaceNlove commentedon May 19, 2026
@nanaeaubry
yes, I could do that, but when I save the JSON from portal to a local file, the property name is type and not item_type, so I (and every other user of the API) would have to do this modification everywhere and everytime we want to convert a local JSON to ItemProperties.
So this is why I would like to have a function instead, so that we can do the task with just one line of code and we don't have to think about remapping certain properties. And the remapping would be maintained by Esri, so if in the future another remap would be needed we as users shouldn't have to think of it at all.
nanaeaubry commentedon May 19, 2026
@PeaceNlove agreed, we will look into a solution for this