v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Role Assignments

List Role Assignments

Lists 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.

get/v2/facts/{proj_id}/{env_id}/role_assignments

Path parameters

proj_idstring required

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 project, or the URL-friendly key of the project (i.e: the "slug").

env_idstring required

Either the unique id of the environment, or the URL-friendly key of the environment (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

userstring[]

optional user(s) filter, will only return role assignments granted to this user(s).

optional user(s) filter, will only return role assignments granted to this user(s).

rolestring[]

optional role(s) filter, will only return role assignments granting this role(s).

optional role(s) filter, will only return role assignments granting this role(s).

tenantstring[]

optional tenant(s) filter, will only return role assignments granted in that tenant(s).

optional tenant(s) filter, will only return role assignments granted in that tenant(s).

resourcestring

optional resource type filter, will only return role assignments granted on that resource type.

optional resource type filter, will only return role assignments granted on that resource type.

resource_instancestring

optional resource instance filter, will only return role assignments granted on that resource instance.

optional resource instance filter, will only return role assignments granted on that resource instance.

detailedboolean

Whether to return full details about the user, tenant and role

Whether to return full details about the user, tenant and role

include_total_countboolean

If true, returns the list of role assignments and the total count.

If true, returns the list of role assignments and the total count.

pageinteger

Page number of the results to fetch, starting at 1.

Page number of the results to fetch, starting at 1.

per_pageinteger

The number of results per page (max 1000).

The number of results per page (max 1000).

Response

Successful Response

OR
OR
OR

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"
  }
]