go
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>"
}
]
}Data Service
Read Relationships
POST
/
v1
/
tenants
/
{tenant_id}
/
data
/
relationships
/
read
go
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 API allows for directly querying the stored graph data to display and filter stored relational tuples.
Path Parameters
Body
application/json
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.
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.