API ReferenceManagement

Fine-Grained Authorization (FGA) API Overview

Overview

Fine-Grained Authorization (FGA) lets you manage complex authorization scenarios in your application. The FGA APIs let administrators manage authorization schemas and relations using a management key.

Management keys are generated from Company > Management Keys. Include the key in the Authorization header as a bearer token in the format <Project ID>:<Management Key>.

Use Cases

  1. Check Permission — verify if a target has a specific relation to a resource
  2. Create Relations — create authorization relations between targets and resources
  3. Delete Relations — remove authorization relations
  4. Get Schema — retrieve the current FGA schema
  5. Save Schema — create or update the FGA schema

Examples

Example - check permission

Use the Check Permission API endpoint to verify if a user has access to a specific resource.

Example - manage relations

  1. Use Create Relations to establish authorization relationships.
  2. Use Delete Relations to remove authorization relationships.

Example - manage schema

  1. Use Get Schema to retrieve the current FGA schema.
  2. Use Save Schema to create or update the FGA schema.
Was this helpful?

On this page