API ReferenceManagement

Fine-Grained Authorization (FGA) API Overview

Overview

Fine-Grained Authorization (FGA) provides a powerful way to manage complex authorization scenarios in your application. Using the FGA APIs enables administrators to manage authorization schemas and relations utilizing a management key.

Management keys are generated from Company > Management Keys. These keys will be used within the bearer token. The format is <Project ID>:<Management Key>.

Use Cases

FGA Management:

  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

Utilize 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