AnsweredAssumed Answered

How do I delete/break relationships between entities

Question asked by sadvani@usgs.gov on Mar 29, 2019
Latest reply on Apr 1, 2019 by bharanigurminder

I created relationships between layers in a feature service in AGOL using the ArcGIS API for Python using the add_to_definition method:

minesite_layer.manager.add_to_definition({"relationships":mining_sites_rel})

However, I can not see to delete the relationship.  I have tried using the update relationship and passing in an empty list, which give a {'success': True}

but the relationships persist.   I have tried using delete_from_definition where I pass in the entire relationship list of dictionaries which gave me: 

Unable to delete feature service layer definition. 'REL_FK_MINING_AND_HAZARDS_20190225_GDB_POINT_MINING_FEATURE_0' is not a constraint. Could not drop constraint. See previous errors.

I can't find anywhere to drop constraints by name.  Anyone else know how to do this?  Has to be a scripted solution.

Outcomes