7.0

Table Of Contents
Example: curl Command for a vSphere reservation
The following command retrieves a compute resource for a vSphere reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Virtual.vSphere/default/computeResource/values -d “{}”
Example: curl Command for an Amazon EC2 reservation
The following command retrieves a compute resource for an Amazon EC2 reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.Amazon/default/computeResource/values -d “{}”
Example: curl Command for a vCloud reservation
The following command retrieves a compute resource for a vCloud reservation.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/data-
service/schema/Infrastructure.Reservation.Cloud.vCloud/default/computeResource/values -d “{}”
Example: JSON Output for a vSphere Reservation
In this example, there are 4 available compute resources that you can use to create a vSphere
reservation, for example cc254a84-95b8-434a-874d-bdfef8e8ad2c. Save a copy of the
underlyingValue section of the compute resource that you want to an XML editor and use the section
content later to create a reservation request.
The following JSON output is returned based on the command input.
{
"values": [{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
"id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
"label": "VC51-Cluster"
},
"label": "VC51-Cluster"
},
{
"underlyingValue": {
"type": "entityRef",
"componentId": null,
"classId": "ComputeResource",
Programming Guide
VMware, Inc. 200