Suhas Kelkar
08/21/2025, 12:49 PMAlon Boshi
08/21/2025, 12:59 PMAsk Inkeep
08/21/2025, 12:59 PMAsk Inkeep
08/21/2025, 12:59 PMkey field is the permanent identifier :
await permit.api.resource_instances.create({
key: "react",
resource: "repository",
tenant: "default",
attributes: {
private: "false",
owner: "Company C",
},
}) ;
Since instance keys cannot be changed after creation, you have a couple of options:
1. *Use attributes for display names*: Store the restaurant's display name as an attribute that can be updated . Resource instance attributes can be modified through the UI or API.
2. *Maintain display names in your app*: Keep the immutable key in Permit for authorization checks while storing user-facing names in your application database.
The first approach keeps everything centralized in Permit, while the second gives you more flexibility for UI-specific needs. Both are valid patterns depending on youAsk Inkeep
08/21/2025, 12:59 PMAlon Boshi
08/21/2025, 1:13 PMSuhas Kelkar
08/21/2025, 2:14 PMOr Weis
08/21/2025, 5:41 PMOr Weis
08/21/2025, 5:42 PM