limited-city-59768
04/25/2024, 5:01 AMchilly-king-10285
04/25/2024, 5:01 AMchilly-king-10285
04/25/2024, 5:01 AMDELETE /admin/relation-tuples
endpoint for deleting relationships. Here are the parameters you can use with this endpoint: - `namespace`: Namespace of the Relationship (optional) - `object`: Object of the Relationship (optional) - `relation`: Relation of the Relationship (optional) - `subject_id`: SubjectID of the Relationship (optional) - `subject_set.namespace`: Namespace of the Subject Set (optional) - `subject_set.object`: Object of the Subject Set (optional) - `subject_set.relation`: Relation of the Subject Set (optional) Please note that this operation does not require authentication. If the request is successful, you will receive a 204 No Content response. If there is an error, you will receive a 400 Bad Request response with a JSON object containing error details. For more information, please refer to the [Ory Keto API documentation](https://www.ory.sh/docs/keto/reference/rest-api).limited-city-59768
04/25/2024, 5:11 AMchilly-king-10285
04/25/2024, 5:11 AMchilly-king-10285
04/25/2024, 5:12 AMPATCH /admin/relation-tuples
endpoint for patching one or more relationships. Here is an example of the request body for patching a relationship: json { 'content': { 'application/json': { 'schema': { 'items': { 'description': 'Payload for patching a relationship', 'properties': { 'action': { 'enum': ['insert', 'delete'], 'type': 'string', 'x-go-enum-desc': 'insert ActionInsert\ndelete ActionDelete' }, 'relation_tuple': { 'description': 'Relationship', 'properties': { 'namespace': { 'description': 'Namespace of the Relation Tuple', 'type': 'string' }, 'object': { 'description': 'Object of the Relation Tuple', 'type': 'string' }, 'relation': { 'description': 'Relation of the Relation Tuple', 'type': 'string' }, 'subject_id': { 'description': 'SubjectID of the Relation Tuple\n\nEither SubjectSet or SubjectID can be provided.', 'type': 'string' }, 'subject_set': { 'properties': { 'namespace': { 'description': 'Namespace of the Subject Set', 'type': 'string' }, 'object': { 'description': 'Object of the Subject Set', 'type': 'string' }, 'relation': { 'description': 'Relation of the Subject Set', 'type': 'string' } }, 'required': ['namespace', 'object', 'relation'], 'type': 'object' } }, 'required': ['namespace', 'object', 'relation'], 'type': 'object' } }, 'type': 'object' }, 'type': 'array' } } }, 'x-originalParamName': 'Body' }
Please note that to perform this operation, you must be authenticated by means of an oryAccessToken
. For more information, please refer to the [Ory Keto API documentation](https://www.ory.sh/docs/keto/reference/rest-api).limited-city-59768
04/25/2024, 5:20 AMchilly-king-10285
04/25/2024, 5:20 AMchilly-king-10285
04/25/2024, 5:20 AMaction
field in the PATCH request for modifying a relationship in Ory Keto API is used to specify the type of operation you want to perform on the relationship. It can take two values: - `insert`: This action is used to create a new relationship or update an existing one. - `delete`: This action is used to delete a relationship. This field is crucial as it determines how the provided relationship data will be processed by the API. Please note that the PATCH operation in Ory Keto API is designed to handle multiple relationship modifications in a single request. Therefore, each relationship data in the request body must specify its own action. For more information, please refer to the [Ory Keto API documentation](https://www.ory.sh/docs/keto/reference/rest-api).limited-city-59768
04/25/2024, 7:06 AMchilly-king-10285
04/25/2024, 7:06 AMchilly-king-10285
04/25/2024, 7:06 AMDELETE /admin/relation-tuples
endpoint and specify the namespace
query parameter. Here is an example: http DELETE /admin/relation-tuples?namespace=<your_namespace>
For the CLI, you can use the ory delete relation-tuples
command and specify the --namespace
flag. Here is an example: bash ory delete relation-tuples --namespace=<your_namespace>
Please note that these operations will delete all relationships involving the specified namespace, so use them with caution. It is recommended to first run the command without the --force
flag to verify that the operation is safe. For more information, please refer to the [Ory Keto API documentation](https://www.ory.sh/docs/keto/reference/rest-api) and the [Ory CLI reference](https://www.ory.sh/docs/cli/ory-delete-relation-tuples).