GET /api/consumer/resourcesTypes displays all the resource types that are available on the system.

curl Command

The following example displays all available resource types.

curl --insecure -H "Content-Type: application/json" -H "Authorization: Bearer $token" https://$vRA/catalog-service/api/consumer/resourceTypes

JSON Output

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

{
  "links" : [ ],
  "content" : [ {
    "@type" : "ResourceType",
    "id" : "Infrastructure.Machine",
    "name" : "Machine",
    "pluralizedName" : "Machines",
    "description" : "The common parent type for all types of machines",
    "primary" : true,
    "schema" : {
      "classId" : "Infrastructure.Machine.Schema",
      "typeFilter" : null
    },
    "forms" : {
      "catalogResourceInfoHidden" : true,
      "details" : {
        "type" : "extension",
        "extensionId" : "csp.places.iaas.resource.details",
        "extensionPointId" : null
      }

Input

Use the supported input parameters to control the command output.

Parameter

Description

URL

https://$vRA/catalog-service/api/consumer/resourceTypes

$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

id

Specifies the unique identifier of this resource.

iconId

Specifies an icon for this request based on the requested object type.

resourceTypeRef

Specifies the resource type.

name

Specifies the resource name.

description

Specifies the resource description.

status

Specifies the resource status.

catalogItem

Specifies the catalog item that defines the service this resource is based on.

requestId

Specifies the request ID that provisioned this resource.

providerBinding

Specifies the provider binding.

owners

Species the owners of this resource.

organization

Specifies the subtenant or tenant that owns this resource.

dateCreated

Specifies the data and time at which the resource was created.

lastUpdated

Specifies the date and time at which the resource was most recently modified.

hasLease

Returns true if the resource is subject to a lease.

lease

Displays the resource's current lease as start and end time stamps.

leaseForDisplay

Specifies the resource's current lease, #getLease, with time units synchronized with #getCosts.

hasCosts

Returns true if the resource is subject to per-time price.

costs

Displays an optional rate of the price charges for the resource. This parameter is deprecated.

costToDate

Displays an optional rate of the current price charges for the resource. This parameter is deprecated.

totalCost

Displays an optional rate of the price charges for the entire lease period. This parameter is deprecated.

expenseMonthToDate

The expense of the resource from the beginning of the month to the current date. This value is updated daily by vRealize Business for Cloud.

parentResourceRef

Displays the parent of this resource.

childResources

Displays the children of this resource.

operations

Specifies the sequence of available operations that can be performed on this resource.

forms

Specifies the forms used to render this resource.

resourceData

Displays the extended provider-defined properties of the resource.

curl Command

The following example command displays all available resource types.

curl --insecure -H "Content-Type: application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/catalog-service/api/consumer/resourceTypes

JSON Output

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

{
  "links" : [ ],
  "content" : [ {
    "@type" : "ResourceType",
    "id" : "Infrastructure.Machine",
    "name" : "Machine",
    "pluralizedName" : "Machines",
    "description" : "The common parent type for all types of machines",
    "primary" : true,
    "schema" : {
      "classId" : "Infrastructure.Machine.Schema",
      "typeFilter" : null
    },
    "forms" : {
      "catalogResourceInfoHidden" : true,
      "details" : {
        "type" : "extension",
        "extensionId" : "csp.places.iaas.resource.details",
        "extensionPointId" : null
      }