GET /api/consumer/resources/types/{resourceTypeId} displays all of the provisioned resources that are owned by the business groups that you manage. You can optionally filter the list by business group name.

curl Command

The following example displays the provisioned resources of one or more business groups.

curl --insecure -H "Content-Type: application/json" 
-H "Authorization: Bearer $token" 
https://$vRA/catalog-service/api/consumer/resources/types/Infrastructure.Machine/?page=1&limit=n&$orderby=id desc&$filter=((organization/subTenant/id eq 'subtenantID_group1') or (organization/subTenant/id eq ''subtenantID_group2') … )"

JSON Output

In the following command input, the subtenant IDs correspond to business groups that are managed by the user who is logged-in.

rest get catalog-service --u  "consumer/resources/types/Infrastructure.Machine/?page=1&limit=2&$orderby=dateCreated desc&$filter=((organization/subTenant/id eq 'eab762cb-6e75-4379-83ef-171a71c9f00e') or (organization/subTenant/id eq 'fa995528-e289-455e-a0e6-c2da8b0e1bf9') or (organization/subTenant/id eq '699efe66-fe6e-4e34-96e8-52a34f338d20') or (organization/subTenant/id eq '4d949784-e93e-4538-accb-6a0a464e4a4b'))"

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

{
  "links" : [ ],
  "content" : [ {
    "@type" : "ConsumerResource",
    "id" : "3bfde906-81b9-44c3-8c2d-07d2c9768168",
    "iconId" : "cafe_default_icon_genericCatalogResource",
    "resourceTypeRef" : {
      "id" : "Infrastructure.Virtual",
      "label" : "Virtual Machine"
    },
    "name" : "test2",
    "description" : null,
    "status" : "ACTIVE",
    "catalogResource" : {
      "id" : "e2f397be-72ad-4ec4-a688-c017560fa1a3",
      "label" : "test-blueprint"
    },
    "requestId" : "b013d2fa-4ba4-416c-b46b-98bb8cc7b076",
    "providerBinding" : {
      "bindingId" : "8a4581a0-84f9-4e80-9af6-75d79633e382",
      "providerRef" : {
        "id" : "6918cd49-b737-467f-94bf-d14d52c78fba",
        "label" : "iaas-service"
      }
    },
    "owners" : [ {
      "tenantName" : "MYCOMPANY",
      "ref" : "fritz@example.mycompany.com",
      "type" : "USER",
      "value" : "Fritz Arbeiter"
    } ],
    "organization" : {
      "tenantRef" : "MYCOMPANY",
      "tenantLabel" : "QETenant",
      "subtenantRef" : "eab762cb-6e75-4379-83ef-171a71c9f00e",
      "subtenantLabel" : "MyTestAgentBusinessGroup"
    },
    "dateCreated" : "2014-09-19T21:19:37.541Z",
    "lastUpdated" : "2014-09-19T21:19:40.888Z",
    "hasLease" : true,
    "lease" : {
      "start" : "2014-09-19T21:18:57.000Z"
    },
    "leaseForDisplay" : null,
    "hasCosts" : true,
    "costs" : {
      "leaseRate" : {
        "type" : "moneyTimeRate",
        "cost" : {
          "type" : "money",
          "currencyCode" : "USD",
          "amount" : 0.0
        },
        "basis" : {
          "type" : "timeSpan",
          "unit" : "DAYS",
          "amount" : 1
        }
      }
    },
    "costToDate" : {
      "type" : "money",
      "currencyCode" : "USD",
      "amount" : 0.0
    },
    "totalCost" : null,
    "childResources" : [ ],
    "operations" : [ {
      "name" : "Reprovision",
      "description" : "Reprovision a machine.",
      "iconId" : "machineReprovision.png",
      "type" : "ACTION",
      "id" : "a1caee9b-d67f-41e8-a7b3-131616a0f6ac",
      "extensionId" : null,
      "providerTypeId" : "com.mycompany.csp.iaas.blueprint.service",
      "bindingId" : "Infrastructure.Machine.Action.Reprovision",
      "hasForm" : false,
      "formScale" : null
    } ],
    "forms" : {
      "catalogResourceInfoHidden" : true,
      "details" : {
        "type" : "extension",
        "extensionId" : "csp.places.iaas.resource.details",
        "extensionPointId" : null
      }
    },
    "resourceData" : {
      "entries" : [ {
        "key" : "Expire",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "MachineGroupName",
        "value" : {
          "type" : "string",
          "value" : "MyTestAgentBusinessGroup"
        }
      }, {
        "key" : "NETWORK_LIST",
        "value" : {
          "type" : "multiple",
          "elementTypeId" : "COMPLEX",
          "resources" : [ {
            "type" : "complex",
            "componentTypeId" : "com.mycompany.csp.component.iaas.proxy.provider",
            "componentId" : null,
            "classId" : "vra.api.model.NetworkViewModel",
            "typeFilter" : null,
            "values" : {
              "entries" : [ {
                "key" : "NETWORK_MAC_ADDRESS",
                "value" : {
                  "type" : "string",
                  "value" : "56:52:4d:e7:46:d4"
                }
              }, {
                "key" : "NETWORK_NAME",
                "value" : {
                  "type" : "string",
                  "value" : "Test Agent-network-1"
                }
              } ]
            }
          } ]
        }
      }, {
        "key" : "SNAPSHOT_LIST",
        "value" : {
          "type" : "multiple",
          "elementTypeId" : "COMPLEX",
          "resources" : [ ]
        }
      }, {
        "key" : "ConnectViaRdp",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "MachineStatus",
        "value" : {
          "type" : "string",
          "value" : "On"
        }
      }, {
        "key" : "PowerOff",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "DISK_VOLUMES",
        "value" : {
          "type" : "multiple",
          "elementTypeId" : "COMPLEX",
          "resources" : [ {
            "type" : "complex",
            "componentTypeId" : "com.mycompany.csp.component.iaas.proxy.provider",
            "componentId" : null,
            "classId" : "vra.api.model.DiskInputModel",
            "typeFilter" : null,
            "values" : {
              "entries" : [ {
                "key" : "DISK_CAPACITY",
                "value" : {
                  "type" : "integer",
                  "value" : 1
                }
              }, {
                "key" : "DISK_DRIVE",
                "value" : {
                  "type" : "string",
                  "value" : "c"
                }
              }, {
                "key" : "DISK_INPUT_ID",
                "value" : {
                  "type" : "string",
                  "value" : "DISK_INPUT_ID1"
                }
              } ]
            }
          } ]
        }
      }, {
        "key" : "MachineBlueprintName",
        "value" : {
          "type" : "string",
          "value" : "test-blueprint"
        }
      }, {
        "key" : "Suspend",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "Reboot",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "Reprovision",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "MachineStorage",
        "value" : {
          "type" : "integer",
          "value" : 1
        }
      }, {
        "key" : "MachineDailyCost",
        "value" : {
          "type" : "decimal",
          "value" : 0.0
        }
      }, {
        "key" : "Destroy",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "MachineType",
        "value" : {
          "type" : "string",
          "value" : "Virtual"
        }
      }, {
        "key" : "InstallTools",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "Shutdown",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "ChangeLease",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "machineId",
        "value" : {
          "type" : "string",
          "value" : "8a4581a0-84f9-4e80-9af6-75d79633e382"
        }
      }, {
        "key" : "MachineMemory",
        "value" : {
          "type" : "integer",
          "value" : 0
        }
      }, {
        "key" : "MachineGuestOperatingSystem"
      }, {
        "key" : "MachineName",
        "value" : {
          "type" : "string",
          "value" : "test2"
        }
      }, {
        "key" : "MachineDestructionDate"
      }, {
        "key" : "MachineCPU",
        "value" : {
          "type" : "integer",
          "value" : 1
        }
      }, {
        "key" : "MachineInterfaceType",
        "value" : {
          "type" : "string",
          "value" : "Test"
        }
      }, {
        "key" : "MachineReservationName",
        "value" : {
          "type" : "string",
          "value" : "Test Agent-Res-1"
        }
      }, {
        "key" : "Reconfigure",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      }, {
        "key" : "EXTERNAL_REFERENCE_ID"
      }, {
        "key" : "MachineExpirationDate"
      }, {
        "key" : "Reset",
        "value" : {
          "type" : "boolean",
          "value" : true
        }
      } ]
    }
  } ],
  "metadata" : {
    "size" : 2,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 1,
    "offset" : 0
  }
}

Input

Use the supported input parameters to control the command output.

Parameter

Description

URL

https://$vRA/catalog-service/api/consumer/resources/type

$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.

$resourceID

Specifies a resource ID. See Display Your Provisioned Resources Example to view all of your requests and search for a request ID.

managedOnly

If true, the returned requests are from the user's managed subtenants.

page

Specifies a page number.

limit

Specifies the number of entries to display on a page. Maximum value is 5000. If not specified, defaults to 20.

For information regarding limits to the number of elements displayed, see Retrieve 10,000 Resources Ordered By Name.

$orderby

Specifies how to order multiple comma-separated properties sorted in ascending or descending order. Values include:

  • $orderby=id

  • $orderby=name

  • $orderby=dateCreated

  • $orderby=lastUpdated

  • $orderby=status

  • $orderby=description

top

Specifies the number of returned entries from the top of the response (total number per page in relation to skip).

skip

Specifies the number of entries to skip.

$filter

Contains a Boolean expression to determine if a particular entry is included in the response.

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.