How do you delete a corrupt portal item?
Our Enterprise Portal is federated and what happen was an item was deleted from the server's ArcGIS Server Manager. This was a mistake since the linked item in portal did not get deleted when the service was deleted from Server Manager. Is there any way to get rid of the portal item? All that happens when you try to open it is you get to watch the loading screen but nothing ever loads. To add to this, the item has delete protection on preventing it from being deleted from the Contents page.
Enterprise Portal version 10.9 - Federated
Any input is appreciated!!
-Jon
You might be able to use the Python API to programmatically disable delete protection and then delete it. That would be the "safest" way to do it.
https://developers.arcgis.com/python/latest/guide/managing-your-content/
I'll look into this! Thanks for the suggestion Ryan.
I tried doing this route, but when I tried to access the item using: gis.content.get() - it returned a bunch of errors stating the item didn't exist basically. So I think because of this something is missing and I won't be able to run the delete protection method on it.
If someone knows more about this let me know, but I think this option is a no go.
Can you perform a test on a test mapservice that gets added to Portal but delete protection is not activated? Does the item get removed from Portal in that scenario? If it does, it would seem that there is a disconnect between Server Manager and Portal where Server Manager does not recognize delete protection on an item in Portal. It would seem that when Server Manager deletes an item, it should see if delete protection is activated for that item in Portal and not allow the delete to occur.
I can't say I'll be able to do this test until I figure out the current issue. But honestly think i'll pass on trying this because if I were to try and delete another service from manager first, it would cause another stuck item in portal possibly.
The documentation I've seen is not super clear on the order of operations when deleting federated portal services. But I did find one line in Esri documentation suggesting to always delete from Portal and not from Server Manager. Since learning that, I always delete from Portal first and since it's federated, the service in manager is deleted automatically with no issues.
You could also try using ArcGIS Assistant to modify the JSON and remove any references to the deleted service, hopefully allowing you to open the item detail page and manage it normally.
I tried looking into this but the assistant couldn't load the item JSON or anything at all. I noticed this was solution for someone else but didn't work in this case.
Possibly reindex the portal.
From - How To: Manually Rebuild the Index in Portal for ArcGIS
NA after 10.7 but the PortalAdmin indexing step should still be valid
<domain>.com:7443/arcgis/portaladmin/
Could you temporarily republish the service that was deleted from server so it has something to reference again?