NSX-T Data Center REST API

Assign roles to User or Group

This API is used to assign a user/group any role(s) of choice on CSP.
It is recommended to use the new property roles_for_paths instead of
roles. When using the roles_for_paths, set the read_roles_for_paths
as true. User has union of all the roles assigned to it on a particular
path and its sub-tree. User name is dealt case-insensitively.

Request:

Method:
PATCH
URI Path(s):
/policy/api/v1/orgs/{org-id}/projects/{project-id}/aaa/role-bindings
Request Headers:
n/a
Query Parameters:
n/a
Request Body:
RoleBinding+

Example Request:

{ "name": "[email protected]", "type": "remote_user", "read_roles_for_paths": true, "roles_for_paths": [ { "path": "/orgs/default", "roles": [ { "role": "org_admin" } ] } ] }

Successful Response:

Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
RoleBinding+

Example Response:

{ "resource_type": "RoleBinding", "description": "", "id": "7e672b0e-f0bd-48bc-b579-9e6f1b2b3969", "display_name": "[email protected]", "roles_for_paths": [ { "path": "/orgs/default", "roles": [ { "role": "org_admin" } ] } ], "name": "[email protected]", "type": "remote_user", "_create_user": "admin", "_create_time": 1493960803006, "_last_modified_user": "admin", "_last_modified_time": 1493960803006, "_system_owned": false, "_protection": "NOT_PROTECTED", "_revision": 0 }

Required Permissions:

crud

Feature:

users_role_assignments

Additional Errors: