rr, err := client.Data.ReadRelationships(context.Background(), &v1.Data.RelationshipReadRequest{
TenantId: "t1",
Metadata: &v1.Data.RelationshipReadRequestMetadata{
SnapToken: ""
},
Filter: &v1.TupleFilter{
Entity: &v1.EntityFilter{
Type: "organization",
Ids: []string{"1"},
},
Relation: "member",
Subject: &v1.SubjectFilter{
Type: "",
Id: []string{""},
Relation: ""
}
}
})client.data.readRelationships({
tenantId: "t1",
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
relation: "member",
subject: {
type: "",
ids: [],
relation: ""
}
}
}).then((response) => {
// handle response
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/relationships/read' \
--header 'Content-Type: application/json' \
--data-raw '{
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
relation: "member",
subject: {
type: "",
ids: [],
relation: ""
}
}
}'{
"tuples": [
{
"entity": {
"type": "<string>",
"id": "<string>"
},
"relation": "<string>",
"subject": {
"type": "<string>",
"id": "<string>",
"relation": "<string>"
}
}
],
"continuous_token": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Read Relationships
rr, err := client.Data.ReadRelationships(context.Background(), &v1.Data.RelationshipReadRequest{
TenantId: "t1",
Metadata: &v1.Data.RelationshipReadRequestMetadata{
SnapToken: ""
},
Filter: &v1.TupleFilter{
Entity: &v1.EntityFilter{
Type: "organization",
Ids: []string{"1"},
},
Relation: "member",
Subject: &v1.SubjectFilter{
Type: "",
Id: []string{""},
Relation: ""
}
}
})client.data.readRelationships({
tenantId: "t1",
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
relation: "member",
subject: {
type: "",
ids: [],
relation: ""
}
}
}).then((response) => {
// handle response
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/data/relationships/read' \
--header 'Content-Type: application/json' \
--data-raw '{
metadata: {
snap_token: "",
},
filter: {
entity: {
type: "organization",
ids: [
"1"
]
},
relation: "member",
subject: {
type: "",
ids: [],
relation: ""
}
}
}'{
"tuples": [
{
"entity": {
"type": "<string>",
"id": "<string>"
},
"relation": "<string>",
"subject": {
"type": "<string>",
"id": "<string>",
"relation": "<string>"
}
}
],
"continuous_token": "<string>"
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Path Parameters
Identifier of the tenant, if you are not using multi-tenancy (have only one tenant) use pre-inserted tenant t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.
Body
RelationshipReadRequest defines the structure of a request for reading relationships. It contains the necessary information such as tenant_id, metadata, and filter for the read operation.
RelationshipReadRequestMetadata defines the structure of the metadata for a read request focused on relationships. It includes the snap_token associated with a particular state of the database.
Show child attributes
Show child attributes
TupleFilter is used to filter tuples based on the entity, relation and the subject.
Show child attributes
Show child attributes
page_size specifies the number of results to return in a single page. If more results are available, a continuous_token is included in the response.
continuous_token is used in case of paginated reads to get the next page of results.
Response
A successful response.
RelationshipReadResponse defines the structure of the response after reading relationships. It includes the tuples representing the relationships and a continuous token for handling result pagination.