VMware Cloud Director API - POST-CreateUser
POST /admin/org/{id}/users
- Operation:
- POST /admin/org/{id}/users
- Description:
-
Create or import a user.
Users can be created locally or imported from the organization's LDAP service.
- Since:
- 0.9
- Deprecated:
- 38.0
- Input parameters
-
- Consume media type(s):
-
application/vnd.vmware.admin.user+xml
application/vnd.vmware.admin.user+json
- Input type:
- UserType
- Output parameters
-
UserType
- Produce media type(s):
-
application/vnd.vmware.admin.user+xml
application/vnd.vmware.admin.user+json
- Output type:
- UserType
- Examples
-
- Request
-
HTTP 1.1
POST /api/admin/org/7b832bc5-3d65-45a2-8d35-da28388ab80a/users
Headers:
Content-Length: 693
Content-Type: application/vnd.vmware.admin.user+xml; charset=ISO-8859-1
x-vcloud-authorization: SZMKkKToUBmDWSEeqZYL2yxpCqDiyToj5PYW3TigOrI=
Body:
<?xml version="1.0" encoding="UTF-8"?><vcloud:User
xmlns:vcloud="http://www.vmware.com/vcloud/v1.5"
name="User"
operationKey="operationKey">
<vcloud:IsEnabled>true</vcloud:IsEnabled>
<vcloud:IsLocked>false</vcloud:IsLocked>
<vcloud:IsExternal>false</vcloud:IsExternal>
<vcloud:ProviderType>INTEGRATED</vcloud:ProviderType>
<vcloud:StoredVmQuota>10</vcloud:StoredVmQuota>
<vcloud:DeployedVmQuota>5</vcloud:DeployedVmQuota>
<vcloud:Role
href="https://vcloud.example.com/api/admin/role/a08a8798-7d9b-34d6-8dad-48c7182c5f66"
name="Organization Administrator"
type="application/vnd.vmware.admin.role+xml"/>
<vcloud:Password>pass1234</vcloud:Password>
</vcloud:User>
- Response
-
HTTP/1.1 201 Created
Headers:
Content-Length: 1150
Content-Type: application/vnd.vmware.admin.user+xml;version=5.5
Location: https://vcloud.example.com/api/admin/user/007a5dfd-32b4-42dd-813b-bfef3da70cb5
Vary: Accept-Encoding
Body:
<?xml version="1.0" encoding="UTF-8"?><User
xmlns="http://www.vmware.com/vcloud/v1.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
href="https://vcloud.example.com/api/admin/user/007a5dfd-32b4-42dd-813b-bfef3da70cb5"
id="urn:vcloud:user:007a5dfd-32b4-42dd-813b-bfef3da70cb5"
name="User"
type="application/vnd.vmware.admin.user+xml"
xsi:schemaLocation="http://www.vmware.com/vcloud/v1.5 http://https://vcloud.example.com/api/v1.5/schema/master.xsd">
<Link
href="https://vcloud.example.com/api/admin/user/007a5dfd-32b4-42dd-813b-bfef3da70cb5"
rel="edit"
type="application/vnd.vmware.admin.user+xml"/>
<IsEnabled>true</IsEnabled>
<IsLocked>false</IsLocked>
<IsAlertEnabled>false</IsAlertEnabled>
<IsExternal>false</IsExternal>
<ProviderType>INTEGRATED</ProviderType>
<IsDefaultCached>false</IsDefaultCached>
<IsGroupRole>false</IsGroupRole>
<StoredVmQuota>10</StoredVmQuota>
<DeployedVmQuota>5</DeployedVmQuota>
<Role
href="https://vcloud.example.com/api/admin/role/a08a8798-7d9b-34d6-8dad-48c7182c5f66"
name="Organization Administrator"
type="application/vnd.vmware.admin.role+xml"/>
<GroupReferences/>
</User>