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
- Check Permission — verify if a target has a specific relation to a resource
- Create Relations — create authorization relations between targets and resources
- Delete Relations — remove authorization relations
- Get Schema — retrieve the current FGA schema
- 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
- Use Create Relations to establish authorization relationships.
- Use Delete Relations to remove authorization relationships.
Example - manage schema
- Use Get Schema to retrieve the current FGA schema.
- Use Save Schema to create or update the FGA schema.
Was this helpful?