Tenants:Update Role Assignments

Search (SHIFT+S)



Update Role Assignments

PUT /tenants/{id}/role-assignments

Add or remove individual role assignments

idthe URN of a ViPR Tenant/Subtenant

Required Roles

Requires one of the following roles:

  • SECURITY_ADMIN
  • TENANT_ADMIN

Request Payload

All parameters are required unless otherwise stated.

Field Description Type Notes
<role_assignment_change>
<add>     0-* Elements
<role> String 0-* Elements
<subject_id> String
<group> String
</add>      
<remove>     0-* Elements
<role> String 0-* Elements
<subject_id> String
<group> String
</remove>      
</role_assignment_change>

Response Body

No data returned in response body

Field Description Type Notes
<role_assignments_create>
<link>
<role_assignment>     0-* Elements
<role> String 0-* Elements
<subject_id> String
<group> String
</role_assignment>      
</role_assignments_create>

Examples

Request
PUT https://192.168.0.0:4443/tenants/urn:storageos:TenantOrg:dbeb4135-e297-40d9-a5d4-9b40c73bdb4b:/role-assignments HTTP/1.1

Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>

<role_assignment_change>
   <add>
      <role>TENANT_APPROVER</role>
      <subject_id>super_sanity@sanity.local</subject_id>
   </add>
</role_assignment_change>
Response
HTTP/1.1 200 OK
Content-Type: application/xml

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  <role_assignments_create>
       <link href="/tenants/urn:storageos:TenantOrg:dbeb4135-e297-40d9-a5d4-9b40c73bdb4b:/role-assignments" rel="self"/>
       <role_assignment>
            <role>TENANT_ADMIN</role>
            <role>TENANT_APPROVER</role>
            <subject_id>super_sanity@sanity.local</subject_id>
       </role_assignment>
       <role_assignment>
            <role>TENANT_ADMIN</role>
            <subject_id>root</subject_id>
       </role_assignment>
  </role_assignments_create>
Notes: