EasyManua.ls Logo

VMware VCLOUD API 1.0 - API

VMware VCLOUD API 1.0 - API
212 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VMware, Inc. 115
Chapter 6 Administrative Operations
Example 6-31. Create a Role
Request:
POST http://vcloud.example.com/api/v1.0/admin/roles
Content-Type: application/vnd.vmware.admin.role+xml
<Role name="vAppWrangler" xmlns="http://www.vmware.com/vcloud/v1">
<Description>Create and manage vApps</Description>
<RightReferences>
<RightReference type="application/vnd.vmware.admin.right+xml"
name="vApp: View"
href="http://vcloud.example.com/api/v1.0/admin/right/16"/>
<RightReference type="application/vnd.vmware.admin.right+xml"
name="vApp: Power Operations"
href="http://vcloud.example.com/api/v1.0/admin/right/9"/>
<RightReference type="application/vnd.vmware.admin.right+xml"
name="vApp: Download"
href="http://vcloud.example.com/api/v1.0/admin/right/11"/>
<RightReference ... />
...
</RightReferences>
</Role>
Response:
201 Created
Content-Type: application/vnd.vmware.admin.role+xml
...
<Role name="vAppWrangler" type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/102" ...>
<Link rel="edit" type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/102"/>
<Link rel="remove" href="http://vcloud.example.com/api/v1.0/admin/role/102"/>
<Description>Create and manage vApps</Description>
<RightReferences>
<RightReference type="application/vnd.vmware.admin.right+xml" name="vApp: View"
href="http://vcloud.example.com/api/v1.0/admin/right/16"/>
<RightReference type="application/vnd.vmware.admin.right+xml"
name="vApp: Power Operations"
href="http://vcloud.example.com/api/v1.0/admin/right/9"/>
<RightReference type="application/vnd.vmware.admin.right+xml"
name="vApp: Download"
href="http://vcloud.example.com/api/v1.0/admin/right/11"/>
<RightReference ... />
...
</RightReferences>
</Role>
View Role Metadata
URLsforallrolesinavCloudappearasRoleReferenceelementsinavCloudbody.Anindividualrole’sURL
isalsodisplayedintheresponsetoarequestthatcreatestheroleAsystemadministratorcanGETaroleURL
toviewtheRolebody.Example 632doesthisforthe
rolecreatedinExample 631.
Example 6-32. View Role Metadata
Request:
GET http://vcloud.example.com/api/v1.0/admin/role/102
Response:
200 OK
Content-Type: application/vnd.vmware.admin.role+xml
...
<Role name="vApp Wrangler" type="application/vnd.vmware.admin.role+xml"
href="http://vcloud.example.com/api/v1.0/admin/role/102" ...>

Table of Contents

Related product manuals