6.2

Table Of Contents
n
If you are not using the API Explorer, verify that you have a valid HTTP bearer token that matches
your login credentials. See Chapter 2 REST API Authentication.
n
View a list of catalog items. See Syntax for Listing Shared and Private Catalog Items.
n
Construct a JSON File for a vCloud Air machine request. See Syntax for Constructing a JSON File for
a vCloud Air Machine Request.
n
Obtain the request ID ($requestId) of the request for which to view status. See Syntax for Viewing All
of Your Requests.
Procedure
1 Find the catalog item that corresponds to the vCloud Air blueprint to use for the machine request by
retrieving a page of published blueprint catalog items.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token”
https://$host/catalog-service/api/consumer/catalogItems?limit=10&page=1
2 Construct a JSON file that contains the work item ID information to approve a machine request.
a Copy the appropriate JSON input file template to a new file in an XML editor that maintains
formatting.
b Substitute the input variables in the template with the values obtained for specific ID.
c Save the file with a new name, for example, request.json.
3 Request a machine as defined in the chosen blueprint or override the default values of the blueprint
by adding properties to the JSON input file to override default values.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token”
https://$host/catalog-service/api/consumer/requests --verbose --data @C:/Temp/requestMachine.json
4 View the details of the machine request by using the catalog service.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token"
https://$host/catalog-service/api/consumer/requests/510051b5-52ce-45db-8889-d4eeabf68da1
Syntax for Finding the Published Blueprint for a vCloud Air Machine Request
You can use the vRealize Automation REST API catalog service to retrieve a page of published blueprint
catalog items that you can use to find the catalog item that corresponds to the vCloud Air blueprint for a
vCloud Air machine request.
Programming Guide
VMware, Inc. 60