7.0

Table Of Contents
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
Then POST the unmodified template to the corresponding URI.
$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
{
"type": "com.vmware.vcac.catalog.domain.request.CatalogResourceRequest",
"resourceId": "dd37b7a1-829c-4773-b5be-b229453eca4a",
"actionId": "02bad06d-f92b-4cf8-b964-37bb5d57be38",
"description": null,
"data": {
"description": null,
"reasons": null
}
}
Programming Guide
VMware, Inc. 92