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
We would like to convert this to a single API, to avoid consistency issues. For example, it could happen that the first API call succeeded and the second one failed, leading to an inconsistent state where data was partially deleted.
To note also that the way we're deleting relationships, by using tuple filter, would make it complicated to re-create the data that succeeded in the first API call - we would need additional API calls to fetch those relationships if we want to do that.
Describe the solution you'd like
It would be good if:
a) the "Delete data" endpoint could receive an array of tuple_filters / attribute_filters
Describe alternatives you've considered
We considered using data bundles where we could execute the 2 deletes in a single "Run Bundle" API call. However, we noticed that bundles work with specific relationships (with subject/entity ids) and not with tuple filter. So, we cannot do something like "delete all relationships where team X is subject" with a data bundle.
Another alternative we considered was the following:
Read all relationships where team X is subject
Read all relationships where team X is entity
Create a bundle to delete all the relationships above
Run bundle
Delete bundle
This however implies having 5 API calls in something that could be done in one. It also feels like a waste to be creating a bundle that only serves a single purpose and cannot be reused.
The text was updated successfully, but these errors were encountered:
We have a scenario where we want to perform 2 delete operations:
At the moment, we need to perform 2 'Delete Data' API calls to Permify. Something like:
POST /data/delete
POST /data/delete
We would like to convert this to a single API, to avoid consistency issues. For example, it could happen that the first API call succeeded and the second one failed, leading to an inconsistent state where data was partially deleted.
To note also that the way we're deleting relationships, by using tuple filter, would make it complicated to re-create the data that succeeded in the first API call - we would need additional API calls to fetch those relationships if we want to do that.
Describe the solution you'd like
It would be good if:
a) the "Delete data" endpoint could receive an array of tuple_filters / attribute_filters
b) or the "Delete data" endpoint could receive an array of specific relationships to delete (with subject and entity identified)
Describe alternatives you've considered
We considered using data bundles where we could execute the 2 deletes in a single "Run Bundle" API call. However, we noticed that bundles work with specific relationships (with subject/entity ids) and not with tuple filter. So, we cannot do something like "delete all relationships where team X is subject" with a data bundle.
Another alternative we considered was the following:
This however implies having 5 API calls in something that could be done in one. It also feels like a waste to be creating a bundle that only serves a single purpose and cannot be reused.
The text was updated successfully, but these errors were encountered: