GET /api/consumer/resourcesTypes/{id} displays a list of the provisioned resources that you own filtered by machine resource type.

curl Command

The following example displays the provisioned resources by resource type.

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

JSON Output

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

The output includes the following highlighted items:

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

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

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.

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