POST
/
v1
/
tenants
/
{tenant_id}
/
data
/
delete
rr, err := client.Data.Delete(context.Background(), &v1.DataDeleteRequest{
    TenantId: "t1",
    Metadata: &v1.DataDeleteRequestMetadata{
        SnapToken: "",
    },
    TupleFilter: &v1.TupleFilter{
        Entity: &v1.EntityFilter{
            Type: "organization",
            Ids: []string{"1"},
        },
        Relation: "admin",
        Subject: &v1.SubjectFilter{
            Type: "user",
            Id: []string{"1"},
            Relation: ""
        }
    }
})
{
  "snap_token": "<string>"
}

Path Parameters

tenant_id
string
required

Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant <code>t1</code> for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.

Body

application/json

DataDeleteRequest defines the structure of a request to delete data. It includes the tenant_id and filters for selecting tuples and attributes to be deleted.

tuple_filter
object

TupleFilter is used to filter tuples based on the entity, relation and the subject.

attribute_filter
object

AttributeFilter is used to filter attributes based on the entity and attribute names.

Response

200
application/json
A successful response.

DataDeleteResponse defines the structure of the response to a data delete request. It includes a snap_token representing the state of the database after the deletion.

snap_token
string

The snap token to avoid stale cache, see more details on Snap Tokens