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.
Validate Project Snapshot POST
### Validate a project snapshot utilizing a management key. This endpoint allows you to validate a project snapshot before importing it. ### See Also - See [Managing Environments](/customize/environments/) for details about managing environments.
Check FGA Permission POST
### Check FGA permission This endpoint allows you to check if a target has a specific relation to a resource using Fine-Grained Authorization.