Skip to content

Commit

Permalink
Added multi user filter for role assignments
Browse files Browse the repository at this point in the history
  • Loading branch information
danyi1212 committed Jul 8, 2024
1 parent bc02bc6 commit 1f79eb7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docs/api/examples/filter-role-associations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ The return object will look like this:
]
```

You can also filter by multiple users or tenants at once.

```bash
curl 'https://api.permit.io/v2/facts/{project_id}/{env_id}/role_assignments?user=alice&user=bob&tenant=default' \
-H 'authorization: Bearer API_SECRET_KEY'
```

## Filter by Role

You can use the `role` query parameter to filter the role associations by role.
Expand Down Expand Up @@ -144,6 +151,9 @@ The return user object will look like this:
]
```

Providing both `tenant` and `resource_instance` filters will only return role assignments if the resource instance is in that tenant.
If multiple tenants are received, the last tenant will be compared with the resource instance.

You can also filter by `resource` to get all role associations for a specific resource type.

```bash
Expand Down

0 comments on commit 1f79eb7

Please sign in to comment.