7.2

Table Of Contents
"number": 1,
"offset": 0
}
}
Get a Compute Resource for the Reservation
You can use the REST API reservation service to obtain compute resources for vRealize Automation
reservations.
Prerequisites
n
Log in to vRealize Automation as a fabric group administrator.
n
Verify that the host name and fully qualied domain name of the vRealize Automation instance are
available.
n
Verify that you have a valid HTTP bearer token that matches your login credentials. See Chapter 2,
“REST API Authentication,” on page 9.
When you create a reservation, you must provide compute resource information that corresponds to the
computeResource parameter.
For example, for a vSphere, Amazon EC2, or vCloud reservation type schema denition, the following
permissibleValues eld in the compute resource output indicates if the compute resource is available and if
it has any dependencies.
“permissibleValues": {"type": "dynamic","customAllowed": false, "dependencies": []}
Procedure
u
Use the following command to get a compute resource.
Command to get a compute resource for 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
“{}”
Command to get 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
Command to get 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
“{}”
The following JSON output is returned based on the command input.
Chapter 3 REST API Use Cases
VMware, Inc. 187