Syntax for Displaying a List of Supported Reservation Types

GET /api/reservations/types displays a list of supported vRealize Automation reservation types.

Input

Use the supported input parameters to control the command output.

Parameter Description
URL https://$vRA/reservation-service/api/reservations/types
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 that 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 objects returned in a pageable list. Each object contains the following information:

@type

Contains the ReservationType string.

createdDate Specifies the create date.
lastUpdated Specifies the last update date.
version Displays the object version number.

Id

Specifies the unique identifier of this resource.

name

Specifies the reservation type name.

description

Specifies the reservation type description.

category

Specifies the reservation category of Virtual, Cloud or Physical.

serviceTypeId

Specifies the vRealize Automation service ID.

tenantId

This contains a null value.

FormReference

Specifies the user interface form reference. This field is valid for user interface elements only.
  • type -- user interface form type
  • formId -- user interface form ID

SchemaClassId

Specifies the schema class ID of the reservation type. Each supported reservation type contains specific fields. The supported fields are defined in the schema. For details, see the reservation service schema definitions in the vRealize Automation API Reference in the vRealize Automation Documentation Center.

alertTypes

Contains the alert type list defined in the reservation type:

  • createdDate -- Alert type created date
  • lastUpdated -- Alert type last updated date
  • version -- Alert type version
  • id -- Unique identifier of alert type
  • name -- Name of alert type
  • description -- Long description of alert type
  • referenceResourceId -- Unique identifier of reference resource

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

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

The following command contains the example bearer token from Syntax for Requesting an HTTP Bearer Token.

curl --insecure -H "Accept:application/json" 
-H "Authorization: Bearer 
MTQxMTY5OTkxODQyNTpkYmZmYjkzZTgzNjdmOGU0NThjZTp0ZW5hbnQ6cWV1c2VybmFtZTpmcml0ekBjb2tlLnZtd2
FyZS5jb206NDhmNGViNzQ3ZjYxY2YxMzdhNDAxOGY2MDAwOTFlZTJiZWI4MmJmZWU5ZTQ0MTI0YWI1M2U4NGNiOTk0
OTJjZjEwNjdhMzdmZTQ5YWMyMzA2NTA5M2UyNzlhMzI2ZGYxZDhlYTgxYmNkNjM5ZTNiNjIyYmEwYTRhOWJiMGE2ZTI=" 
https://myVRA.eng.mycompany.com/reservation-service/api/reservations/types

JSON Output for a vSphere Reservation

In the following response, there are 8 reservation types. For the vSphere reservation, the reservation type ID is Infrastructure.Reservation.Virtual.vSphere, and its schema class ID is Infrastructure.Reservation.Virtual.vSphere.

{
  "links": [],
  "content": [{
    "@type": "ReservationType",
    "createdDate": "2015-10-13T04:44:32.008Z",
    "lastUpdated": "2015-10-13T04:44:32.009Z",
    "version": 1,
    "id": "Infrastructure.Reservation.Virtual.vSphere",
    "name": "vSphere",
    "description": "vSphere Reservation",
    "category": "Virtual",
    "serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
    "tenantId": null,
    "formReference": {
      "type": "external",
      "formId": "Infrastructure.Reservation.Virtual.vSphere.form.new"
    },
    "schemaClassId": "Infrastructure.Reservation.Virtual.vSphere",
    "alertTypes": [{
      "createdDate": "2015-10-13T04:44:32.008Z",
      "lastUpdated": "2015-10-13T04:44:32.008Z",
      "version": 0,
      "id": "d248eeee-238c-4e87-9e95-f263b04d113f",
      "name": "storage",
      "description": null,
      "referenceResourceId": "storage"
  },//Omit 7 reservation types here
  ],
  "metadata": {
    "size": 20,
    "totalElements": 8,
    "totalPages": 1,
    "number": 1,
    "offset": 0
  }
}

JSON Output for a vCloud Air Reservation

In the following response, there are 8 reservation types. For the vCloud Air reservation, the reservation type ID is Infrastructure.Reservation.Cloud.vCloudAir and its schema class ID is Infrastructure.Reservation.Cloud.vCloudAir.

{
  "links": [],
  "content": [{
    {
      "@type": "ReservationType",
      "createdDate": "2015-11-06T10:21:06.010Z",
      "lastUpdated": "2015-11-06T10:21:06.011Z",
      "version": 1,
      "id": "Infrastructure.Reservation.Cloud.vCloudAir",
      "name": "vCloud",
      "description": "vCloud Reservation",
      "category": "Cloud",
      "serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
      "tenantId": null,
      "formReference": {
        "type": "external",
        "formId": "Infrastructure.Reservation.Cloud.vCloudAir.form.new"
      },
      "schemaClassId": "Infrastructure.Reservation.Cloud.vCloudAir",
      "alertTypes": [
        {
          "createdDate": "2015-11-06T10:21:06.010Z",
          "lastUpdated": "2015-11-06T10:21:06.010Z",
          "version": 0,
          "id": "cd707ad2-d504-43e2-8002-11ee670dcf41",
          "name": "storage",
          "description": null,
          "referenceResourceId": "storage"
        },
        {
          "createdDate": "2015-11-06T10:21:06.010Z",
          "lastUpdated": "2015-11-06T10:21:06.010Z",
          "version": 0,
          "id": "ef96fec4-a607-4944-a0af-fbe7df862ee2",
          "name": "memory",
          "description": null,
          "referenceResourceId": "memory"
        },
        {
          "createdDate": "2015-11-06T10:21:06.011Z",
          "lastUpdated": "2015-11-06T10:21:06.011Z",
          "version": 0,
          "id": "043e0815-9f02-4876-b5ce-ddbedabb8ff6",
          "name": "cpu",
          "description": null,
          "referenceResourceId": "cpu"
        },
        {
          "createdDate": "2015-11-06T10:21:06.011Z",
          "lastUpdated": "2015-11-06T10:21:06.011Z",
          "version": 0,
          "id": "77e90acd-93ab-4bbe-853a-b74923dae70a",
          "name": "machine",
          "description": null,
          "referenceResourceId": "machine"
        }
      ]
    }, //Omit 7 reservation types here
  ],
  "metadata": {
    "size": 20,
    "totalElements": 8,
    "totalPages": 1,
    "number": 1,
    "offset": 0
  }
}

JSON Output for an Amazon Reservation

In the following response, there are 8 reservation types. For the Amazon reservation, the reservation type ID is Infrastructure.Reservation.Cloud.Amazon and its schema class ID is Infrastructure.Reservation.Cloud.Amazon.

{
  "links": [],
  "content": [{
  {
    "@type": "ReservationType",
    "createdDate": "2015-10-13T04:44:32.074Z",
    "lastUpdated": "2015-10-13T04:44:32.075Z",
    "version": 1,
    "id": "Infrastructure.Cloud.Amazon",
    "name": "Amazon",
    "description": "Amazon Reservation",
    "category": "Cloud",
    "serviceTypeId": "com.mycompany.csp.iaas.blueprint.service",
    "tenantId": null,
    "formReference": {
      "type": "external",
      "formId": "Infrastructure.Cloud.Amazon.form.new"
    },
    "schemaClassId": "Infrastructure.Cloud.Amazon",
    "alertTypes": [{
      "createdDate": "2015-10-13T04:44:32.075Z",
      "lastUpdated": "2015-10-13T04:44:32.075Z",
      "version": 0,
      "id": "2ef8f47c-045c-4ee4-821d-7b1543ea5f11",
      "name": "machine",
      "description": null,
      "referenceResourceId": "machine"
    }]
  },//Omit 7 reservation types here
  ],
  "metadata": {
    "size": 20,
    "totalElements": 8,
    "totalPages": 1,
    "number": 1,
    "offset": 0
  }
}