Syntax for Viewing Details of a Machine Request
GET /api/consumer/requests/{requestId} provides the details of a machine request, where requestId is the URI in the Location header.
Request Status
Phase | Description | End State? |
---|---|---|
UNSUBMITTED | Request was saved but not submitted. | No |
PENDING_PRE_APPROVAL | Request is subject to approval - pre-provisioning approval required. | No |
IN_PROGRESS | Request is in progress, machine is being provisioned. | No |
PENDING_POST_APPROVAL | Request is subject to approval, post-provisioning approval required. | No |
SUCCESSFUL | Request completed successfully. The machine is available under provisioned resources on the Items tab. | Yes |
FAILED | Request failed. | Yes |
REJECTED | Request approval was rejected and will not complete. | Yes |
Input
Use the supported input parameters to control the command output.
Parameter | Description |
---|---|
URL | https://$vRA/catalog-service/api/consumer/requests/$requestId |
$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. |
$requestId | Specifies the request ID. See
Display Your Provisioned Resources Example
to view all of your requests and search for a request ID.
The required request ID is located at the end of the Location URL in the response header. The request ID is located in the Location field of the response header if you submitted the request with the –headers flag. |
Output
The command output contains property names and values based on the command input parameters.
Property | Description |
---|---|
version | Displays the object version number. |
state | Specifies the item state, such as submitted. |
approvalStatus | Specifies a status indicating whether this request has been approved, rejected, or is still pending some form of approval. |
waitingStatus | Specifies a status indicating whether this request is waiting on any external users or services before it is able to progress. |
requestNumber | Specifies a more user-friendly identifier for this request. |
executionStatus | Specifies the current execution status of the request. |
stateName | Specifies the localized state name. |
phase | Specifies the current phase of the request, which is more coarse grained and easier for users to understand. |
id | Specifies the unique identifier of this resource. |
iconId | Specifies an icon for this request based on the requested object type. |
description | Contains a brief description of this request. |
reasons | Specifies the business reasons entered by the requestor or owner of this request. |
requestedFor | Specifies the ID of the user for whom this request is logged. |
requestedBy | Specifies the ID of the user who actually submitted the request |
organization | Subtenant and/or tenant owner of this request. |
requestorEntitlementId | Specified the value of the requestorEntitlement setting. |
preApprovalId | Specifies the ID of the preApproval setting. |
postApprovalId | Specifies the ID of the approval generated for the post-provisioning workflow step. |
dateCreated | Specifies the date when this request was sent to the catalog. |
lastUpdated | Specifies the date when this request was last updated. |
dateSubmitted | Specifies the date when this request was first submitted. |
dateApproved | Specifies the date when this request was approved. |
dateCompleted | Specifies the date when this request was completed. |
quote | Contains a quote made by the provider defining the estimated price(es) associated with the request and/or any resources provisioned as a result of the request. |
requestCompletion | Contains additional request completion information. |
requestData | Contains a map of the provider-specific field-value pairs collected for this request. |
retriesRemaning |
Specifies the number of attempts remaining to move this request from its current state to the next state in the request workflow. Some state transitions require calls to external services. These calls may fail due to transient errors such as momentary network errors. In these cases, the catalog will retry the call a number of times before failing. This property defines the number of retries remaining for the current state transition. When it reaches 0, the catalog will stop retrying and mark the request as failed. This property is reset to the default number of retries for every new operation that is triggered. |
requestedItemName | Specifies the item name. |
requestedItemDescription | Specifies the item description. |
components | Returns the list of components associated with the request. The provider supplies this list of components after request initialization. |
curl Command to View the Details of the Machine Request
curl --insecure -H "Content-Type: application/json" -H "Authorization: Bearer $token” https://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-edd7c7983a5b
The following sample output contains information about the catalog item request 7aaf9baf-aa4e-47c4-997b-edd7c7983a5b.
{ "@type": "CatalogItemRequest", "id": "7aaf9baf-aa4e-47c4-997b-edd7c7983a5b", "iconId": "cafe_default_icon_genericCatalogItem", "version": 6, "requestNumber": 8, "state": "SUCCESSFUL", "description": "API test", "reasons": null, "requestedFor": "[email protected]", "requestedBy": "[email protected]", "organization": { "tenantRef": "mycompany", "tenantLabel": "mycompany", "subtenantRef": "c0683388-6db2-4cb5-9033-b24d15ad3766", "subtenantLabel": "Demo Group" }, "requestorEntitlementId": "1b409157-152c-43c4-b4cc-1cdef7f6adf8", "preApprovalId": null, "postApprovalId": null, "dateCreated": "2015-07-29T13:50:33.689Z", "lastUpdated": "2015-07-29T13:55:35.951Z", "dateSubmitted": "2015-07-29T13:50:33.689Z", "dateApproved": null, "dateCompleted": "2015-07-29T13:55:35.949Z", "quote": {}, "requestCompletion": { "requestCompletionState": "SUCCESSFUL", "completionDetails": null }, "requestData": { $detailsOfSubmittedRequest }, "retriesRemaining": 3, "requestedItemName": "Linux", "requestedItemDescription": "Linux blueprint for API demo", "stateName": "Successful", "approvalStatus": "POST_APPROVED", "executionStatus": "STOPPED", "waitingStatus": "NOT_WAITING", "phase": "SUCCESSFUL", "catalogItemRef": { "id": "7c8275d6-1bd6-452a-97c4-d6c053e4baa4", "label": "Linux" } }