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

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.

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

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

schema
object

The SchemaDefinition message provides definitions for entities and rules, and includes references to clarify whether a name refers to an entity or a rule.