List Role Assignments
Changed onLists the role assignments defined within an environment.
- If the user filter is present, will only return the role assignments of that user (supports multiple).
- If the tenant filter is present, will only return the role assignments in that tenant (supports multiple).
- If the role filter is present, will only return role assignments that are granting that role (supports multiple).
- If the resource filter is present, will only return role assignments for resource instances of that resource type.
- If the resource_instance filter is present, will only return role assignments for that resource instance.
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.
Request
- Base URLhttps://api.permit.io (the document declares no server; this is the origin it was published from)
- AuthHTTP bearer
Path parameters
Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").
Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").
Query parameters
optional user(s) filter, will only return role assignments granted to this user(s). Split larger sets into successive requests of at most 100 values each.
optional role(s) filter, will only return role assignments granting this role(s). Split larger sets into successive requests of at most 100 values each.
optional tenant(s) filter, will only return role assignments granted in that tenant(s). Split larger sets into successive requests of at most 100 values each. Note: when combined with resource_instance, only the last tenant value is used to resolve that instance, while the tenant filter itself still applies to every value. If the instance exists under that last tenant, the result is skewed by that resolution; if it does not, the request fails with 404 even when the instance exists under another tenant in the list. Either outcome depends on the order of the values, so pass a single tenant alongside resource_instance.
optional resource type filter, will only return role assignments granted on that resource type.
optional resource instance filter, will only return role assignments granted on that resource instance.
Whether to return full details about the user, tenant and role
If true, returns the list of role assignments and the total count.
Page number of the results to fetch, starting at 1.
The number of results per page (max 1000).
Response
Successful Response
Example response
[
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user": "jane@coolcompany.com",
"role": "admin",
"tenant": "stripe-inc",
"user_id": "7c60d51f-b44e-4682-87d6-449835ea4d11",
"role_id": "405d8375-3514-403b-8c43-83ae74cfe022",
"tenant_id": "40ef0e48-a11f-4963-a229-e396c9f7e733",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"project_id": "405d8375-3514-403b-8c43-83ae74cfe0e9",
"environment_id": "40ef0e48-a11f-4963-a229-e396c9f7e7c4",
"created_at": "2019-08-24T14:15:22Z"
}
]Changes
- info
for the
queryrequest parameterper_page, the max was increased from100.00to1000.00
- info
- info
queryrequest parameterdetailedwas deprecated - info
queryrequest parameterinclude_total_countwas deprecated
- info