Syntax for Displaying a List of Reservations

GET /api/reservations displays a list of existing vRealize Automation reservations. You can use this list to obtain the required reservation ID value in preparation for updating or deleting a reservation.

Input

Use the supported input parameters to control the command output.

Parameter Description
URL https://$vRA/reservation-service/api/reservations
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.

Output

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

Property Description
Links Species an array of link objects, each of which contains the following parts:
rel Specifies the name of the link.
  • Self refers to the object which was returned or requested.
  • First, Previous, Next, and Last refer to corresponding pages of pageable lists.
  • Specifies the application or service that determines the other names.
href Specifies the URL that produces the result.
Content Specifies an array of data rows, each of which represents one of the tenant objects returned in a pageable list.
Metadata Specifies the paging-related data.
Size Specifies the maximum number of rows per page.
totalElements Specifies the number of rows returned.
totalPages Specifies the total number of pages of data available.
Number Specifies the current page number.
Offset Specifies the number of rows skipped.

curl Command

The following example command displays a list of reservations.

curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/reservation-service/api/reservations

JSON Output

The following sample output lists two vSphere reservations, named MyTestReservation1 and MyTestReservation2. For related information, see Syntax for Verifying a Reservation and Getting Reservation Details.

You can use the id value for each reservation to update or delete them. For related information, see Syntax for Updating a Reservation or Syntax for Deleting a Reservation.

{
  "links": [],
  "content": [{
  "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": ["[email protected]",
    "[email protected]"],
    "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"
      }
    }],
  "metadata": {
    "size": 0,
    "totalElements": 1,
    "totalPages": 1,
    "number": 1,
    "offset": 0
  }
}