Syntax for Getting Deployment Details
GET /api/consumer/requests/{id}/resourceViews retrieves resources provisioned by a given request.
Accessing Links to Provisioned Items
You can access links to
provisioned items from a given request by appending
/resourceViews
to the request details URI. For instance, you can edit
the example request URI from as follows:
http://$vRA/catalog-service/api/consumer/requests/$requestId/resourceViews
In addition to the general information about the provisioned deployment returned in the response, such as its name, description and ID, the response contains additional HATEOAS links.
Link | Description |
---|---|
GET: Catalog Item |
URI to get the catalog item details from which this catalog item was provisioned. See Syntax for Viewing Details of a Machine Request. |
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, such as 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. |
id | UUID of a request. |
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.
cost
in API commands and output.
Property | Description |
---|---|
resourceId | The unique identifier of the resource. |
iconId | Specifies an icon for this request based on the requested object type. |
name | The user friendly name of the resource. |
description | An extended user friendly description of the resource. |
status | The status of the resource. For example, On, Off, etc. |
catalogItemId | The identifier of the catalog item associated with this provisioned resource. |
catalogItemLabel | The label of the catalog item associated with this provisioned resource. |
requestId | The unique identifier of the request that created this provisioned resource. |
businessGroupId | The unique identifier of the business group that owns this resource. |
tenantId | The unique identifier of the tenant that owns this resource. |
owners | The owner of this resource. |
resourceType | The type identifier of this resource. For example, Virtual Machine. |
parentResourceId | The unique identifier of the parent resource. Used for child resources of a multi-machine resource. |
hasChildren | Returns trun if this resource has child resources. Used if this is a multi-machine resource. |
dateCreated | The date and time at which the resource was created. |
lastUpdated | The date and time at which the resource was most recently modified. |
lease | The current lease of the resource. |
costs | An optional rate card of the prices and charges levied against the resource. This parameter is deprecated. |
costToDate | An optional rate card of the existing prices and charges levied against the resource. This parameter is deprecated |
totalCost | An optional rate card of the pricess and charges levied 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. |
data | The extended, provider defined properties of the resource. |
Example Curl Command
$curl --insecure -s -H" Content-Type: multipart/form-data" -H "Authorization: Bearer $token" http://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-edd7c7983a5b/resourceViews
JSON Output
{ "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 } }