Skip to content

Latest commit

 

History

History
176 lines (104 loc) · 7.77 KB

RoleAssignmentsApi.md

File metadata and controls

176 lines (104 loc) · 7.77 KB

\RoleAssignmentsApi

All URIs are relative to http://localhost

Method HTTP request Description
assign_role POST /v2/facts/{proj_id}/{env_id}/role_assignments Assign Role
bulk_assign_role POST /v2/facts/{proj_id}/{env_id}/role_assignments/bulk Bulk create role assignments(EAP)
bulk_unassign_role DELETE /v2/facts/{proj_id}/{env_id}/role_assignments/bulk Bulk Unassign Role
list_role_assignments GET /v2/facts/{proj_id}/{env_id}/role_assignments List Role Assignments
unassign_role DELETE /v2/facts/{proj_id}/{env_id}/role_assignments Unassign Role

assign_role

models::RoleAssignmentRead assign_role(proj_id, env_id, role_assignment_create) Assign Role

Assigns a role to a user within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant.

Parameters

Name Type Description Required Notes
proj_id String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). [required]
env_id String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). [required]
role_assignment_create RoleAssignmentCreate [required]

Return type

models::RoleAssignmentRead

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

bulk_assign_role

models::BulkRoleAssignmentReport bulk_assign_role(proj_id, env_id, role_assignment_create) Bulk create role assignments(EAP)

Parameters

Name Type Description Required Notes
proj_id String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). [required]
env_id String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). [required]
role_assignment_create Vecmodels::RoleAssignmentCreate [required]

Return type

models::BulkRoleAssignmentReport

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

bulk_unassign_role

models::BulkRoleUnAssignmentReport bulk_unassign_role(proj_id, env_id, role_assignment_remove) Bulk Unassign Role

Parameters

Name Type Description Required Notes
proj_id String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). [required]
env_id String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). [required]
role_assignment_remove Vecmodels::RoleAssignmentRemove [required]

Return type

models::BulkRoleUnAssignmentReport

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_role_assignments

models::ResponseListRoleAssignmentsV2FactsProjIdEnvIdRoleAssignmentsGet list_role_assignments(proj_id, env_id, user, role, tenant, resource, resource_instance, detailed, page, per_page) 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. - If the tenant filter is present, will only return the role assignments in that tenant. - If the role filter is present, will only return role assignments that are granting that role.

Parameters

Name Type Description Required Notes
proj_id String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). [required]
env_id String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). [required]
user Option<String> optional user filter, will only return role assignments granted to this user.
role Option<String> optional role filter, will only return role assignments granting this role.
tenant Option<String> optional tenant filter, will only return role assignments granted in that tenant.
resource Option<String> optional resource type filter, will only return role assignments granted on that resource type.
resource_instance Option<String> optional resource instance filter, will only return role assignments granted on that resource instance.
detailed Option<bool> Whether to return full details about the user, tenant and role [default to false]
page Option<i32> Page number of the results to fetch, starting at 1. [default to 1]
per_page Option<i32> The number of results per page (max 100). [default to 30]

Return type

models::ResponseListRoleAssignmentsV2FactsProjIdEnvIdRoleAssignmentsGet

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

unassign_role

unassign_role(proj_id, env_id, role_assignment_remove) Unassign Role

Unassigns a user role within a tenant. The tenant defines the scope of the assignment. In other words, the role is effective only within the tenant. If the role is not actually assigned, will return 404.

Parameters

Name Type Description Required Notes
proj_id String Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug"). [required]
env_id String Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug"). [required]
role_assignment_remove RoleAssignmentRemove [required]

Return type

(empty response body)

Authorization

HTTPBearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]