View Machine Details Example
GET /api/consumer/requests/{id}/resourceViews displays the machine details for a provisioned machine.
curl Command
The following example displays machine details for a provisioned machine with resourceID=7aaf9baf-aa4e-47c4-997b-edd7c7983a5b.
curl --insecure -H "Content-Type: application/json" -H "Authorization: Bearer $token” http://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-edd7c7983a5b/resourceViews
JSON Output
The following JSON output is returned based on the command input.
{ "links": [], "content": [ { "@type": "CatalogResourceView", "links": [ { "@type": "link", "rel": "GET: Catalog Item", "href": "https://$vRA/catalog-service/api/consumer/entitledCatalogItemViews/7c8275d6-1bd6-452a-97c4-d6c053e4baa4" }, { "@type": "link", "rel": "GET: Request", "href": "https://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-edd7c7983a5b" }, { "@type": "link", "rel": "GET Template: {com.vmware.csp.component.cafe.composition@resource.action.deployment.destroy.name}", "href": "https://$vRA/catalog-service/api/consumer/resources/c4d3db3e-e397-44ff-a1c9-0ecebdba12f4/actions/416e6bb1-3357-448b-8396-e268d5f7343b/requests/template" }, { "@type": "link", "rel": "POST: {com.vmware.csp.component.cafe.composition@resource.action.deployment.destroy.name}", "href": "https://$vRA/catalog-service/api/consumer/resources/c4d3db3e-e397-44ff-a1c9-0ecebdba12f4/actions/416e6bb1-3357-448b-8396-e268d5f7343b/requests" }, { "@type": "link", "rel": "GET: Child Resources", "href": "https://$vRA/catalog-service/api/consumer/resourceViews?managedOnly=false&withExtendedData=true&withOperations=true&%24filter=parentResource%20eq%20%27c4d3db3e-e397-44ff-a1c9-0ecebdba12f4%27" } ], "resourceId": "c4d3db3e-e397-44ff-a1c9-0ecebdba12f4", "iconId": "cafe_default_icon_genericCatalogItem", "name": "Linux-80813151", "description": null, "status": null, "catalogItemId": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4", "catalogItemLabel": "Linux", "requestId": "7aaf9baf-aa4e-47c4-997b-edd7c7983a5b", "resourceType": "{com.vmware.csp.component.cafe.composition@resource.type.deployment.name}", "owners": [ "Connie Summers" ], "businessGroupId": "c0683388-6db2-4cb5-9033-b24d15ad3766", "tenantId": "mycompany", "dateCreated": "2015-07-29T13:51:36.368Z", "lastUpdated": "2015-07-29T13:55:35.963Z", "lease": null, "costs": null, "costToDate": null, "totalCost": null, "parentResourceId": null, "hasChildren": true, "data": {} } ], "metadata": { "size": 20, "totalElements": 1, "totalPages": 1, "number": 1, "offset": 0 } }
Using the API to Get Deployment Details
To view deployed machine
details, append
/resourceViews
to the request details URI that you
generated when you retrieved request details.
http://$vRA/catalog-service/api/consumer/requests/$requestId/resourceViews
See Syntax for Viewing Details of a Machine Request.
In addition to general information about the provisioned deployment such as its name, description, and ID, the response contains additional HATEOAS links that enable you to obtain additional details and information.
Link | Description |
---|---|
GET: Catalog Item | URI to get the catalog item details (as described in sections 3.2.1 and 3.2.2) from which this catalog item was provisioned. |
GET: Request | URI to get the request details that provisioned this item. |
GET:Template
{com.vmware.csp.component.cafe.composition@resource.action.deployment.$actionName |
URI to get a template request for a specific action that you can perform on this resource. Typically, on a deployment the action will be Delete. |
POST:
{com.vmware.csp.component.cafe.composition@resource.action.deployment.$actionName |
URI to which to post the request to perform an action, based on the corresponding template. |
GET: Child Resources | If the deployment contains child resources (nodes specified in the composite blueprint), this is the URI to get a list of the resourceViews for the children of this deployment. |
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/catalog-service/api/consumer/resources/$resourceId |
$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. |
$orderby | Specifies how to order multiple comma-separated properties sorted in ascending or descending order. |
$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. |