go
sr, err := client.Schema.Read(context.Background(), &v1.SchemaReadRequest{
TenantId: "t1",
Metadata: &v1.SchemaReadRequestMetadata{
SchemaVersion: "cnbe6se5fmal18gpc66g",
},
})let res = client.schema.read({
tenantId: "t1",
metadata: {
schemaVersion: swResponse.schemaVersion,
},
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/schemas/read' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"schema_version": "cnbe6se5fmal18gpc66g"
}
}'{
"schema": {
"entityDefinitions": {},
"ruleDefinitions": {},
"references": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Schema Service
Read Schema
POST
/
v1
/
tenants
/
{tenant_id}
/
schemas
/
read
go
sr, err := client.Schema.Read(context.Background(), &v1.SchemaReadRequest{
TenantId: "t1",
Metadata: &v1.SchemaReadRequestMetadata{
SchemaVersion: "cnbe6se5fmal18gpc66g",
},
})let res = client.schema.read({
tenantId: "t1",
metadata: {
schemaVersion: swResponse.schemaVersion,
},
})curl --location --request POST 'localhost:3476/v1/tenants/{tenant_id}/schemas/read' \
--header 'Content-Type: application/json' \
--data-raw '{
"metadata": {
"schema_version": "cnbe6se5fmal18gpc66g"
}
}'{
"schema": {
"entityDefinitions": {},
"ruleDefinitions": {},
"references": {}
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}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/tenants//schemas/read for configuration of your authorization model on Permify API.

Example Request on Postman
POST/v1/tenants/{tenant_id}/schemas/read
Path Parameters
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
A successful response.
SchemaReadResponse is the response message for the Read method in the Schema service. It returns the requested schema.