7.1

Table Of Contents
n
Verify that you have a valid HTTP bearer token that matches your login credentials. See Chapter 2
REST API Authentication.
n
Obtain the business group subtenant ID values to specify on the command line. See Syntax for
Getting Deployment Details.
n
Syntax for Getting Deployment Details
You can use the REST API catalog service to identify provisioned items from a given request.
n
Syntax for Navigating to the Children of a Deployed Resource
Use the GET: Child Resources link to retrieve a list of the child nodes of a deployment, including
virtual machines, networks, and other objects you may have configured on the blueprint canvas.
n
Perform a Day 2 Action: Power Off
You can use the REST API catalog service to perform a power off action. For simple actions that
require no user input, the process is straightforward.
n
Perform a Day 2 Action: Change Lease
You can use the REST API catalog service to change a lease. For actions that require user input,
you may need to edit the template prior to submitting the request.
Procedure
1 Display a list of all provisioned resources.
$curl --insecure -s
-H" Content-Type: multipart/form-data" -H "Authorization: Bearer $token"
http://
$host/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-
edd7c7983a5b/resourceViews
The output from this command includes HATEOAS links that enable you to quickly obtain additional
information about specific deployed resources.
2 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:// $host
/catalog-service/api/consumer/resourceViews?
managedOnly=false&withExtendedData=true&withOperations=true&%24filter=parentResource%20eq
%20%27c4d3db3e-e397-44ff-a1c9-0ecebdba12f4%27
3 In addition, you can use the HATEOAS links to complete day 2 actions.
n
You can use a command like the following to get the template for the resource action request and
use it to power off a machine.
$curl --insecure -s
-H" Content-Type: multipart/form-data" -H "Authorization: Bearer $token"
https://$host/catalog-service/api/consumer/resources/dd37b7a1-829c-4773-b5be-
b229453eca4a/actions/02bad06d-f92b-4cf8-b964-37bb5d57be38/requests/template
Programming Guide
VMware, Inc. 98