Skip to main content
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: ""
        }
    }
})
{
  "tuples": [
    {
      "entity": {
        "type": "<string>",
        "id": "<string>"
      },
      "relation": "<string>",
      "subject": {
        "type": "<string>",
        "id": "<string>",
        "relation": "<string>"
      }
    }
  ],
  "continuous_token": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://proxy-docs.permify.co/llms.txt

Use this file to discover all available pages before exploring further.

Read API allows for directly querying the stored graph data to display and filter stored relational tuples.

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 t1 for this field. Required, and must match the pattern \“[a-zA-Z0-9-,]+\“, max 64 bytes.

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.

metadata
object

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.

filter
object

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

page_size
integer<int64>

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
string

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.

tuples
object[]

tuples is a list of the relationships retrieved in the read operation, represented as entity-relation-entity triples.

continuous_token
string

continuous_token is used in the case of paginated reads to retrieve the next page of results.