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:
- 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
Utilize 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
Delete Project POST
### Delete a project utilizing a management key. This endpoint allows you to delete a project. This action is irreversible, use with caution. ### 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.