premsankars
10/11/2023, 6:52 AMvroldanbet
10/11/2023, 8:59 AMReadRelationships and define filter over the resource_type, resource_id and subject_type and subject_id. You'd just leave relation undefined. That'd give you all relationships between those two objects.
https://buf.build/authzed/api/docs/main:authzed.api.v1#authzed.api.v1.RelationshipFilterpremsankars
10/11/2023, 9:10 AMvroldanbet
10/11/2023, 9:17 AMzed because the arguments are positional, but the API should technically support it. Would you mind opening an issue in zed?vroldanbet
10/11/2023, 9:19 AMgrpcurlvroldanbet
10/11/2023, 9:20 AMgrpcurl -vv -H "Authorization: bearer foobar" -d '{"relationship_filter":{"resource_type": "resource"}, "optional_limit": "250", "optional_allow_partial_deletions": "true"}' --plaintext localhost:50051 authzed.api.v1.PermissionsService.DeleteRelationshipsvroldanbet
10/11/2023, 9:20 AMvroldanbet
10/11/2023, 9:33 AM{
"consistency": {
"minimize_latency": true
},
"relationship_filter": {
"resource_type": "resource",
"optional_resource_id": "1",
"optional_subject_filter": {
"subject_type": "user",
"optional_subject_id": "1"
}
}
}
`vroldanbet
10/11/2023, 9:34 AMrelation is not definedpremsankars
10/11/2023, 11:34 AMpremsankars
10/11/2023, 11:34 AM