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

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"

permify-schema

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
metadata
object

SchemaReadRequestMetadata provides additional information for the Schema Read request. It contains schema_version to specify which version of the schema should be read.

Response

200 - application/json

The response is of type any.