You can use the REST API catalog service to display a list of the provisioned resources that you own filtered by machine resource type.

Input

Use the supported input parameters to control the command output.

Parameter

Description

URL

https://$host/catalog-service/api/consumer/resourceType

$host

Specifies the host name and fully qualified domain name or IP address of the vRealize Automation identity server.

$token

Specifies a valid HTTP bearer token with necessary credentials.

Filter by the following resource types:

  • Infrastructure.Machine

  • Infrastructure.AppServic

  • Infrastructure.Cloud

  • Infrastructure.Physical

  • Infrastructure.vApp

  • Infrastructure.Virtual

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

costs

Displays an optional rate of the cost charges for the resource.

costToDate

Displays an optional rate of the current cost charges for the resource.

totalCost

Displays an optional rate of the cost charges for the entire lease period.

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 the provisioned resources by resource type.

curl --insecure -H "Content-Type: application/json" 
-H "Authorization: Bearer $token” 
https://$host/catalog-service/api/consumer/resourceTypes/Infrastructure.Machine/?page=1&limit=1

JSON Output

In this example, the highlighted resource ID (3bfde906-81b9-44c3-8c2d-07d2c9768168) corresponds to a provisioned machine owned by the logged-in user. The resource IDs are used in requests to retrieve the details for the corresponding machines.

Also in this example, the subtenantRef ID (eab762cb-6e75-4379-83ef-171a71c9f00e) corresponds to the business group of the logged-in user. If the logged-in user is also the manager of the business group, the subtenantRef ID is used to get resources from all business groups that the user manages.

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"
    },
…
}