https://authzed.com logo
Hello Could you tell if there is an
v

vganshin

03/30/2023, 12:13 PM
Hello. Could you tell if there is an endpoint to wipe all relations from SpiceDB?
v

vroldanbet

03/30/2023, 12:51 PM
there is no endpoint to delete all relationships. We have a
DeleteRelationship
method that allows you to specify a filter, so that would only help deleting a specific relation, not all relationships from all relations.
You can also delete relationships using
WriteRelationships
, so you could pass a list of all relationships to delete (please note that this should be done batched, since that's a transaction in the database, and would be a very large transaction if you attempt to delete everything)
v

vganshin

03/30/2023, 3:52 PM
I need to know ids of relations I want to delete. got it, thanks. I just wanted to apply another schema, but it failed because there was relations in SpiceDB, which were not defined in a new schema. And I wanted to remove all relations, apply new schema and upload new relations, based on that schema.
v

vroldanbet

03/30/2023, 4:49 PM
right, yeah then you can use
DeleteRelationship
, it's for that 😄