POST
/
v1
/
tenants
/
{tenant_id}
/
schemas
/
read
sr, err := client.Schema.Read(context.Background(), &v1.SchemaReadRequest{
    TenantId: "t1",
    Metadata: &v1.SchemaReadRequestMetadata{
        SchemaVersion: "cnbe6se5fmal18gpc66g",
    },
})
{
  "schema": {
    "entityDefinitions": {},
    "ruleDefinitions": {},
    "references": {}
  }
}

When a model is written to Permify using the write schema API a schema version will be returned by the API. That schema version can be used to inspect the schema.

Permify Schema needed to be send to API endpoint /v1/schemas/read for configuration of your authorization model on Permify API.

Example Request on Postman

POST /v1/tenants/{tenant_id}/schemas/read"

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

SchemaReadRequest is the request message for the Read method in the Schema service. It contains tenant_id and metadata about the schema to be read.

Response

200
application/json
A successful response.

SchemaReadResponse is the response message for the Read method in the Schema service. It returns the requested schema.