7.2

Table Of Contents
Example: JSON Output
The following sample location URL is displayed, including the new Amazon reservation ID.
Location: https://$host/reservation-service/api/reservations/3289b039-2a11-4ab4-a0bc-b583e4c6d085
Copy the output response into an XML editor for use in a future procedure, such as updating or deleting the
reservation.
Verify a Reservation and Get Reservation Details
After you create a vRealize Automation reservation, you can use the REST API reservation service along
with reservation ID to verify that the reservation exists. You can also use the ID to get information about the
reservation in preparation for updating or deleting it.
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.
n
Finish creating a new reservation. Obtain the reservation ID from the output URL. See “Syntax for
Creating a vSphere Reservation,” on page 209.
n
Get the reservation ID if you do not already know it. See “Display a List of Reservations,” on page 244.
Procedure
u
Use the reservation service to verify that a reservation exists by using the verication ID.
The following example command veries the existence of a reservation with an ID of
94d74105-831a-4598-8f42-efd590fea15c and returns reservation details.
curl --insecure -H "Accept:application/json"
-H "Authorization: Bearer $token"
https://$host/reservation-service/api/reservations/94d74105-831a-4598-8f42-efd590fea15c
The following JSON output is returned based on the command input.
{
"id": "94d74105-831a-4598-8f42-efd590fea15c ",
"name": "TestReservation",
"reservationTypeId": "Infrastructure.Reservation.Virtual.vSphere",
"tenantId": "qe",
"subTenantId": "ef58f604-528d-4441-a219-4725bead629b",
"enabled": true,
"priority": 3,
"reservationPolicyId": "b71c3a5f-087a-4d9e-9a56-fab785a3d128",
"alertPolicy": {
"enabled": true,
"frequencyReminder": 20,
"emailBgMgr": false,
"recipients": ["user1@mycompany.com",
"user2@mycompany.com"],
"alerts": [{
"alertPercentLevel": 10,
"referenceResourceId": "storage",
"id": "storage"
Programming Guide
228 VMware, Inc.