Authzed · Schema

Relationship

Relationship specifies how a resource relates to a subject. Relationships form the data for the graph over which all permissions questions are answered.

AuthorizationAccess ControlPermissionsZanzibarSpiceDBgRPCRESTRelationship-Based Access ControlReBACFine-Grained AuthorizationIdentitySecurity

Properties

Name Type Description
resource object
relation string relation is how the resource and subject are related.
subject object subject is the subject to which the resource is related, in some manner.
optionalCaveat object
optionalExpiresAt string optional_expires_at is the time at which the relationship expires, if any.
View JSON Schema on GitHub

JSON Schema

Relationship.json Raw ↑
{
  "type": "object",
  "properties": {
    "resource": {
      "$ref": "#/components/schemas/ObjectReference",
      "title": "resource is the resource to which the subject is related, in some manner"
    },
    "relation": {
      "type": "string",
      "description": "relation is how the resource and subject are related."
    },
    "subject": {
      "$ref": "#/components/schemas/SubjectReference",
      "description": "subject is the subject to which the resource is related, in some manner."
    },
    "optionalCaveat": {
      "$ref": "#/components/schemas/ContextualizedCaveat",
      "title": "optional_caveat is a reference to a the caveat that must be enforced over the relationship"
    },
    "optionalExpiresAt": {
      "type": "string",
      "format": "date-time",
      "description": "optional_expires_at is the time at which the relationship expires, if any."
    }
  },
  "description": "Relationship specifies how a resource relates to a subject. Relationships\nform the data for the graph over which all permissions questions are\nanswered.",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/authzed/main/json-schema/Relationship.json",
  "title": "Relationship"
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/Relationship"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.