Syntax for Verifying a Reservation and Getting Reservation Details

GET /api/reservations/{id} retrieves a vRealize Automation reservation. After you create a reservation, you can use the 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.

Input

Use the supported input parameters to control the command output.

Parameter Description
URL https://$vRA/reservation-service/api/reservations/$reservationId

This is the URL that is generated when you create a reservation using the REST API. See Syntax for Creating a vSphere Reservation.

Method Get
$vRA

Specifies the appliance name and fully qualified domain name, or IP address of the vRealize Automation server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

$reservationId Specifies the unique identifier of the reservation to verify. Obtain the value from the output generated when you created the reservation. See Create a Reservation.

Output

The command output contains property names and values based on the command input parameters.

Property Description
status The HTTP response status is 201 created to indicate that the reservation exists.
Header.Location The HTTP response should contain a location attribute, format as https://$vRA /reservation-service/api/reservations/$reservationId.
$reservationId The HTTP response should contain a location attribute, formatted as https://$vRA /reservation-service/api/reservations/$reservationId.

curl Command

In the following example, the reservation ID of 94d74105-831a-4598-8f42-efd590fea15c is the value you obtained when you created the reservation.

curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/reservation-service/api/reservations/94d74105-831a-4598-8f42-efd590fea15c

JSON Output for a vSphere Reservation

The following JSON output is returned based on the command input.

Copy the output response into an XML editor for future step usage.

{
  "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"
    },
    {
      "alertPercentLevel": 20,
      "referenceResourceId": "memory",
      "id": "memory"
    },
    {
      "alertPercentLevel": 30,
      "referenceResourceId": "cpu",
      "id": "cpu"
    },
    {
      "alertPercentLevel": 40,
      "referenceResourceId": "machine",
      "id": "machine"
    }]
  },
  "extensionData": {
    "entries": [{
      "key": "key4",
      "value": {
        "type": "string",
        "value": "custom-property-value4"
      }
    },
    {
      "key": "key3",
      "value": {
        "type": "string",
        "value": "custom-property-value3"
      }
    },
    {
      "key": "reservationNetworks",
      "value": {
        "type": "multiple",
        "elementTypeId": "COMPLEX",
        "items": [{
          "type": "complex",
          "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
          "componentId": null,
          "classId": "reservationNetwork",
          "typeFilter": null,
          "values": {
            "entries": [{
              "key": "reservationNetworkProfile",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "NetworkProfile",
                "id": "ed5d1503-08ac-42ca-804d-9167834a63a5",
                "label": "ETEDoNotDelete2014-10-13 13:10:56"
              }
            },
            {
              "key": "reservationNetworkPath",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "Network",
                "id": "44cb65d5-b321-43dd-a2ab-8ecf387bff8f",
                "label": "VM Network SQA"
              }
            }]
          }
        }]
      }
    },
    {
      "key": "key0",
      "value": {
        "type": "string",
        "value": "custom-property-value0"
      }
    },
    {
      "key": "key2",
      "value": {
        "type": "string",
        "value": "custom-property-value2"
      }
    },
    {
      "key": "reservationMemory",
      "value": {
        "type": "complex",
        "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
        "componentId": null,
        "classId": "reservationMemory",
        "typeFilter": null,
        "values": {
          "entries": [{
            "key": "hostMemoryTotalSizeMB",
            "value": {
              "type": "integer",
              "value": 57187
            }
          },
          {
            "key": "reservationMemoryReservedSizeMb",
            "value": {
              "type": "integer",
              "value": 15888
            }
          }]
        }
      }
    },
    {
      "key": "key1",
      "value": {
        "type": "string",
        "value": "custom-property-value-Updated"
      }
    },
    {
      "key": "computeResource",
      "value": {
        "type": "entityRef",
        "componentId": null,
        "classId": "ComputeResource",
        "id": "047e00f5-5424-4ed2-a751-4a334aeaff54",
        "label": "VC51-Cluster"
      }
    },
    {
      "key": "machineQuota",
      "value": {
        "type": "integer",
        "value": 2
      }
    },
    {
      "key": "reservationStorages",
      "value": {
        "type": "multiple",
        "elementTypeId": "COMPLEX",
        "items": [{
          "type": "complex",
          "componentTypeId": "com.mycompany.csp.iaas.blueprint.service",
          "componentId": null,
          "classId": "reservationStorage",
          "typeFilter": null,
          "values": {
            "entries": [{
              "key": "storageTotalSizeGB",
              "value": {
                "type": "integer",
                "value": 394
              }
            },
            {
              "key": "reservationStorageReservedSizeGB",
              "value": {
                "type": "integer",
                "value": 31
              }
            },
            {
              "key": "reservationStorageEnabled",
              "value": {
                "type": "boolean",
                "value": true
              }
            },
            {
              "key": "reservationStoragePath",
              "value": {
                "type": "entityRef",
                "componentId": null,
                "classId": "StoragePath",
                "id": "f48a527b-30a6-4d54-8829-f549bc195b69",
                "label": "VNXe:qe-vnxe-nfs-1"
              }
            },
            {
              "key": "storageFreeSizeGB",
              "value": {
                "type": "integer",
                "value": 120
              }
            },
            {
              "key": "reservationStorageReservationPriority",
              "value": {
                "type": "integer",
                "value": 1
              }
            }]
          }
        }]
      }
    },
    {
      "key": "resourcePool",
      "value": {
        "type": "entityRef",
        "componentId": null,
        "classId": "ResourcePools",
        "id": "4e51fabc-19e8-4e79-b413-d52309b3bb62",
        "label": "CoreDev"
      }
    }]
  }
}

Example Output for a vCloud Reservation

{
  "id": "bf922450-d495-460d-9dbf-1c09b0692db2",
  "name": "TestvAppReservation",
  "reservationTypeId": "Infrastructure.Reservation.Cloud.vCloud",
  "tenantId": "qe",
  "subTenantId": "a5d056be-3aa2-4fdd-ba1e-a3805f26f0e0",
  "enabled": true,
  "priority": 1,
  "reservationPolicyId": null,
  "alertPolicy": {
    "enabled": false,
    "frequencyReminder": 0,
    "emailBgMgr": true,
    "recipients": [
      
    ],
    "alerts": [
      {
        "alertPercentLevel": 80,
        "referenceResourceId": "storage",
        "id": "storage"
      },
      {
        "alertPercentLevel": 80,
        "referenceResourceId": "memory",
        "id": "memory"
      },
      {
        "alertPercentLevel": 80,
        "referenceResourceId": "cpu",
        "id": "cpu"
      },
      {
        "alertPercentLevel": 80,
        "referenceResourceId": "machine",
        "id": "machine"
      }
    ]
  },
  "extensionData": {
    "entries": [
      {
        "key": "computeResource",
        "value": {
          "type": "entityRef",
          "componentId": null,
          "classId": "ComputeResource",
          "id": "c527a0f5-b1ae-4b61-8145-ad9d5c434dc7",
          "label": "Engineering Allocation VDC"
        }
      },
      {
        "key": "machineQuota",
        "value": {
          "type": "integer",
          "value": 0
        }
      },
      {
        "key": "allocationModel",
        "value": {
          "type": "integer",
          "value": 0
        }
      },
      {
        "key": "reservationNetworks",
        "value": {
          "type": "multiple",
          "elementTypeId": "COMPLEX",
          "items": [
            {
              "type": "complex",
              "componentTypeId": "com.vmware.csp.iaas.blueprint.service",
              "componentId": null,
              "classId": "Infrastructure.Reservation.Network",
              "typeFilter": null,
              "values": {
                "entries": [
                  {
                    "key": "networkPath",
                    "value": {
                      "type": "entityRef",
                      "componentId": null,
                      "classId": "Network",
                      "id": "42c5063c-5422-448f-aac7-22ebe941ac8e",
                      "label": "VM Network SQA"
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "key": "reservationStorages",
        "value": {
          "type": "multiple",
          "elementTypeId": "COMPLEX",
          "items": [
            {
              "type": "complex",
              "componentTypeId": "com.vmware.csp.iaas.blueprint.service",
              "componentId": null,
              "classId": "Infrastructure.Reservation.Storage",
              "typeFilter": null,
              "values": {
                "entries": [
                  {
                    "key": "computeResourceStorageTotalSizeGB",
                    "value": {
                      "type": "integer",
                      "value": 1000
                    }
                  },
                  {
                    "key": "storagePath",
                    "value": {
                      "type": "entityRef",
                      "componentId": null,
                      "classId": "Storage",
                      "id": "e655aa78-e5fb-4722-9e8a-0cd4139248cf",
                      "label": "High Performance Storage"
                    }
                  },
                  {
                    "key": "storageReservationPriority",
                    "value": {
                      "type": "integer",
                      "value": 1
                    }
                  },
                  {
                    "key": "storageReservedSizeGB",
                    "value": {
                      "type": "integer",
                      "value": 100
                    }
                  },
                  {
                    "key": "storageEnabled",
                    "value": {
                      "type": "boolean",
                      "value": true
                    }
                  },
                  {
                    "key": "computeResourceStorageFreeSizeGB",
                    "value": {
                      "type": "integer",
                      "value": 691
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "key": "reservationMemory",
        "value": {
          "type": "complex",
          "componentTypeId": "com.vmware.csp.iaas.blueprint.service",
          "componentId": null,
          "classId": "Infrastructure.Reservation.Memory",
          "typeFilter": null,
          "values": {
            "entries": [
              {
                "key": "computeResourceMemoryTotalSizeMB",
                "value": {
                  "type": "integer",
                  "value": 13312
                }
              },
              {
                "key": "memoryReservedSizeMb",
                "value": {
                  "type": "integer",
                  "value": 4096
                }
              }
            ]
          }
        }
      }
    ]
  }
}