Hello. Could you tell if there is an endpoint to w...
# spicedb
v
Hello. Could you tell if there is an endpoint to wipe all relations from SpiceDB?
v
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
Oh, 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
right, yeah then you can use
DeleteRelationship
, it's for that 😄