Ayomide Apantaku
12/04/2025, 11:06 AM`${apiUrl}/v2/facts/${projectId}/${envId}/role_assignments?tenant={}&resource_instance={}&user={}`;Or Weis
12/04/2025, 11:13 AMAsk Inkeep
12/04/2025, 11:13 AMAsk Inkeep
12/04/2025, 11:13 AMresource_instance filter without specifying a user filter. (1)
The correct API call format is:
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/role_assignments?resource_instance=document:photo' \
-H 'authorization: Bearer API_SECRET_KEY'
When you include the user parameter in your query, you're filtering the results to only show assignments for that specific user. To get all users with access to the resource instance, remove the user parameter from your query.
For local PDP queries, you can also use:
permissions: RoleAssignmentRead = permit.pdp_api.role_assignments.list(
resource_instance_key="document:onboarding-doc",
)
(2)
This will return all role assignments for that resource instance, showing you every user who has been granted access.Ask Inkeep
12/04/2025, 11:13 AMOr Weis
12/04/2025, 11:15 AMAyomide Apantaku
12/04/2025, 11:19 AMAsk Inkeep
12/04/2025, 11:19 AM