EMC ViPR REST API

Search (SHIFT+S)

API Reference


Create Sub Tenant

POST /tenants/{id}/subtenants

Create subtenant

idthe URN of a ViPR Tenant

Required Roles

  • SECURITY_ADMIN

Prerequisites

These conditions must be met before calling this operation.

  • An authentication provider needs to support the domain used in the mappings

Request Payload

All parameters are required unless otherwise stated.

Field Description Type Notes
<tenant_create>
<name> Name of the tenant to create. Any free form string within length limits String Valid Values:
  •  Length: 2..128
<user_mappings> List of user mappings for this tenant
<user_mapping>     0-* Elements
<domain> A single-valued attribute indicating the user's IDP domain String
<attributes>
<attribute>     0-* Elements
<key> Lookup string for this key-value pair String
<value> Lookup result for this key-value pair String 0-* Elements
</attribute>      
</attributes>
<groups>
<group> String 0-* Elements
</groups>
</user_mapping>      
</user_mappings>
<description> Description for the tenant. String
<namespace> Namespace associated to a tenant. String
<detachNamespace> Parameter to detach namespace from a tenant. Boolean
<namespaceStorage> Namespace object storage associated to a tenant. URI
<web_storage_default_project> Default project URI for this tenant URI
<web_storage_default_vpool> Default virtual pool URI for this tenant URI
</tenant_create>

Response Body

Subtenant details

Field Description Type Notes
<tenant>
<description> Optional Detailed Description of the Tenant String
<parent_tenant>    
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</parent_tenant>      
<user_mappings> User mappings define how a user is mapped to a tenant. The user can be mapped to a tenant using parameters such as domains, LDAP attributes, and AD group membership.
<user_mapping>     0-* Elements
<domain> A single-valued attribute indicating the user's IDP domain String
<attributes>
<attribute>     0-* Elements
<key> Lookup string for this key-value pair String
<value> Lookup result for this key-value pair String 0-* Elements
</attribute>      
</attributes>
<groups>
<group> String 0-* Elements
</groups>
</user_mapping>      
</user_mappings>
<namespace> Namespace mapped to the Tenant String
<namespace_storage_system> Namespace associated with storage mapped to the Tenant URI
<name> The name assigned to this resource in ViPR. The resource name is set by a user and can be changed at any time. It is not a unique identifier. String
<id> An identifier that is generated by ViPR when the resource is created. The resource ID is guaranteed to be unique and immutable across all virtual data centers for all time. URI
<link> A hyperlink to the details for this resource
<creation_time> A timestamp that shows when this resource was created in ViPR DateTime
<tags> Keywords and labels that can be added by a user to a resource to make it easy to find when doing a search.
<tag> String 0-* Elements
</tags>
<inactive> Whether or not the resource is inactive. When a user removes a resource, the resource is put in this state before it is removed from the ViPR database. Boolean
<global> Boolean
<remote> Boolean
<vdc>    
<id> ViPR ID of the related object URI
<link> A hyperlink to the related object
</vdc>      
<internal> Whether or not the resource is an internal resource. Boolean
</tenant>

XML Example

Request
POST  https://192.168.0.0:4443/tenants/urn:storageos:TenantOrg:79600b60-eb8e-4073-802d-7ef9be620893:/subtenants HTTP/1.1

Content-Type: application/xml
X-SDS-AUTH-TOKEN: <AUTH_TOKEN>
 
<tenant_create>
     <name>sub1</name>
     <description>My sub tenant</description>
     <user_mappings>
          <user_mapping>
               <domain>sanity.local</domain>
               <attributes>
                    <attribute>
                         <key>company</key>
                         <value>abc</value>
                    </attribute>
               </attributes>
          </user_mapping>
     </user_mappings>
</tenant_create>
Response
HTTP/1.1 200 OK
Content-Type: application/xml

<tenant>
     <creation_time>1379960599440</creation_time>
     <id>urn:storageos:TenantOrg:b41e7de9-7bee-4e07-bb3d-1404b2aa9305:</id>
     <inactive>false</inactive>
     <link href="/tenants/urn:storageos:TenantOrg:b41e7de9-7bee-4e07-bb3d-1404b2aa9305:" rel="self"/>
     <name>sub1</name>
     <tags/>
     <description>My sub tenant</description>
     <parent_tenant>
     <id>urn:storageos:TenantOrg:79600b60-eb8e-4073-802d-7ef9be620893:</id>
     <link href="/tenants/urn:storageos:TenantOrg:79600b60-eb8e-4073-802d-7ef9be620893:" rel="self"/>
     </parent_tenant>
     <user_mappings>
          <user_mapping>
               <attributes>
                    <attribute>
                         <key>company</key>
                         <value>abc</value>
                    </attribute>
               </attributes>
               <domain>sanity.local</domain>
               <groups/>
          </user_mapping>
     </user_mappings>
</tenant>