VMware, Inc. 111
Chapter 6 Administrative Operations
Response:
201 Created
Content-Type: application/vnd.vmware.admin.user+xml
...
<User name="ExampleUser" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/user/85" ...>
<Link rel="edit" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/user/85"/>
<FullName>Example User Full Name</FullName>
<EmailAddress>user@example.com</EmailAddress>
<IsEnabled>true</IsEnabled>
<IsAlertEnabled>false</IsAlertEnabled>
<IsDefaultCached>false</IsDefaultCached>
<StoredVmQuota>0</StoredVmQuota>
<DeployedVmQuota>0</DeployedVmQuota>
<Role type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/105"/>
<GroupReferences/>
</User>
ToimportauserfromanLDAPdirectoryservice,POSTaUserbodywhosenameattributespecifiestheuser’s
nameintheLDAPdirectory,andincludesanIsExternalelementwithavalueoftrue.Theservermatches
thevalueofthenameattributeintherequestbodywiththevalueof
theLDAPattributethattheorganization
hasspecifiedfortheusername(thevalueoftheUserNameelementinUserAttributes),andimportsthatuser
fromLDAP.See“UserAttributes”onpage 184.
Example 6‐25illustratesthissortofrequest.
Example 6-25. Import a User from LDAP
Request:
POST http://vcloud.example.com/api/v1.0/admin/org/26/users
Content-Type: application/vnd.vmware.admin.user+xml
...
<User name="user@example.com" type="application/vnd.vmware.admin.user+xml"
xmlns="http://www.vmware.com/vcloud/v1">
<IsExternal>true</IsExternal>
<Role type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/105"/>
</User>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.user+xml
...
<User name="user@example.com" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/user/85" ...>
<Link rel="edit" type="application/vnd.vmware.admin.user+xml"
href="http://vcloud.example.com/api/v1.0/admin/user/85"/>
<FullName>Example User</FullName>
<EmailAddress>user@example.com</EmailAddress>
<IsEnabled>false</IsEnabled>
<IM/>
<NameInSource>\F4\D3\42\8E\6A\BC\D3</NameInSource>
<IsAlertEnabled>false</IsAlertEnabled>
<IsDefaultCached>false</IsDefaultCached>
<StoredVmQuota>0</StoredVmQuota>
<DeployedVmQuota>0</DeployedVmQuota>
<Role type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/105"/>
<GroupReferences/>
</User>