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
URLs
for
all
roles
in
a
vCloud
appear
as
RoleReference
elements
in
a
vCloud
body.
An
individual
role’s
URL
is
also
displayed
in
the
response
to
a
request
that
creates
the
role
A
system
administrator
can
GET
a
role
URL
to
view
the
Role
body.
Example 6
‐
32
does
this
for
the
role
created
in
Example 6
‐
31
.
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" ...>
Summary of Contents for VCLOUD API 1.0 - TECHNICAL NOTE
Page 10: ...vCloud API Programming Guide 10 VMware Inc...
Page 20: ...vCloud API Programming Guide 20 VMware Inc...
Page 32: ...vCloud API Programming Guide 32 VMware Inc...
Page 90: ...vCloud API Programming Guide 90 VMware Inc...
Page 150: ...vCloud API Programming Guide 150 VMware Inc...
Page 170: ...vCloud API Programming Guide 170 VMware Inc...