7.3

Table Of Contents
3 Use the GET: Child Resources HATEOAS link to retrieve a list of child nodes of a deployment.
$curl --insecure -s -H" Content-Type: multipart/form-data" -H "Authorization: Bearer $token"
https:// $vRA/catalog-service/api/consumer/resourceViews?
managedOnly=false&withExtendedData=true&withOperations=true&%24filter=parentResource%20eq
%20%27c4d3db3e-e397-44ff-a1c9-0ecebdba12f4%27
For details regarding input and output of this sample, see Syntax for Navigating to the Children of a
Deployed Resource.
What to do next
Use the HATEOS links obtained from retrieving the list of child nodes to perform actions.
n
See Power Off.
n
See Change Lease.
Note The vRealize Automation REST API does not support custom resource actions template API calls.
However, you can perform custom resource actions programmatically by using the vRealize CloudClient.
For additional posts and articles that illustrate methods for performing actions by using the
vRealize Automation REST API or vRealize CloudClient tool, see the Executing Day 2 Actions with the
vRA 7 REST API blog post.
Power O
You use the catalog service to perform a power off action. For simple actions that require no user input,
the process is straightforward.
This command leverages the links for the power off action from the command used in the Syntax for
Navigating to the Children of a Deployed Resource example.
{
"@type": "link",
"rel": "GET Template: {...iaas.proxy.provider@resource.action.name.machine.PowerOff}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/02ba...e38/requests/template"
},
{
"@type": "link",
"rel": "POST: {com.vmware..iaas.proxy.provider@resource.action.name.machine.PowerOff}",
"href": "https://$vRA/api/consumer/resources/dd3...a4a/actions/02b...e38/requests"
}
Procedure
1 Get the template for the resource action request.
$curl --insecure -s -H" Content-Type: multipart/form-data" -H "Authorization: Bearer $token"
https://$vRA/catalog-service/api/consumer/resources/dd37b7a1-829c-4773-b5be-
b229453eca4a/actions/02bad06d-f92b-4cf8-b964-37bb5d57be38/requests/template
Programming Guide
VMware, Inc. 108