You can use the REST API catalog service to display a list of actions enabled on the blueprint used to provision the specified machine, entitled to the logged-in user, and available in the current state of the provisioned machine.

Input

Use the supported input parameters to control the command output.

Table 1. Inputs for Viewing the Available Actions for a Provisioned Machine

Parameter

Description

URL

https://$host/catalog-service/api/consumer/requests/$requestId

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

$resourceId

Specifies the resource ID for the request.

Output

The command output contains property names and values based on the command input parameters.

Table 2. Outputs for Viewing the Available Actions for a Provisioned Machine

Property

Description

type

Specifies the operation type. The property type is resourceOperationType.

id

Specifies the identifier for the resource operation. The property type is string.

extensionId

Specifies the unique ID of the UI extension that is associated with the operation if #getType() is set to ResourceOperationType#EXTENSION.

providerTypeId

Specifies the ID type for providers that support the action if #getType() is set to ResourceOperationType#ACTION. The property type is string.

bindingId

Specifies the unique ID of the action that the external provider that published it recognizes if #getType() is set to ResourceOperationType#ACTION. The property type is string.

hasForm

Indicates if the action has a request form to complete if #getType() is set to ResourceOperationType#ACTION. The property type is Boolean.

formScale

Specifies the form scale value of the request form for the action, if applicable. The property type is formScale.

curl Command

The following example command displays the available actions for a provisioned machine by using its resource ID.

curl --insecure -H "Content-Type: application/json" 
-H "Authorization: Bearer $token” 
https://$host/catalog-service/api/consumer/resources/resourceID/actions

JSON Output

The highlighted resource action ID corresponds to the reprovisioning actions that are available for the specified machine.

{
  "links" : [ ],
  "content" : [ {
    "@type" : "ConsumerResourceOperation",
    "name" : "Reprovision",
    "description" : "Reprovision a machine.",
    "iconId" : "machineReprovision.png",
    "type" : "ACTION",
    "id" : "a1caee9b-d67f-41e8-a7b3-131616a0f6ac",
    "extensionId" : null,
    "providerTypeId" : "com.mycompany.csp.iaas.blueprint.service",
    "bindingId" : "Infrastructure.Machine.Action.Reprovision",
    "hasForm" : false,
    "formScale" : null
  } ]
}