Expand Relationships
Permissions API
Expand Relationships
Get all users and group relationships associated with an object by role
POST
Expand Relationships
The Expand endpoint can be used to query relationships in the permissions graph, returning all users and sets of users that have a certain relationship type to a given object. This provides visibility into why certain users have access to a file (via direct access, inherited role, group membership, or parent access).
Here’s a breakdown of using this endpoint to list all users (and groups) that have a
This provides a response like:
This tells us that the users / groups that can read this file can be found in relations:
can_read relationship to a file.
First, we can call the /expand endpoint to query can_read relationships to a file ID:
Response
- Users with the
viewerrole explicitly assigned to this file - Users with the
editorrole explicitly assigned to this file - Users with the
viewerrole to the parent of this file (file:db847d33-9272-5f4e-87a9-0b7fde41638f) - Users with the
viewerrole to the space to which this file belongs (space:42d2e50f-2e93-5f14-98c3-911c9a3fdb39)
Authorizations
Paragon User Token. Add to the Authorization header of your requests.
Path Parameters
UUID of the Sync to query, returned from the Enable Sync endpoint.
Body
application/json
Response
200 - application/json
Expanded relationships tree showing all users and groups related to the object