7.3

Table Of Contents
Example: curl Command to Request a Machine
To construct your request, refer to the entitledCatalogItemViews response received when you ran the
request described in Syntax for Getting a Template Request for a Catalog Item, locate a link field that
contains a value similar to the following:
{
"@type":"link",
"href":"https://$vRA/catalog-service/api/consumer/entitledCatalogItems/f89fcbbf-7716-4a61-
addd-a822dd4206f6/requests",
"rel":"POST: Submit Request"
}
The following example command submits a machine request using appropriately edited template content
from the entitledCatalogItemViews response.
curl --insecure -H "Content-Type: application/json"
-H "Authorization: Bearer $token
https://$vRA/catalog-service/api/consumer/entitledCatalogItems/f89fcbbf-7716-4a61-addd-
a822dd4206f6/requests
{
$contentsOfTemplateFromPrecedingSections
}
Example: Output with Request and Response Headers
The following sample displays the request and response headers and the command output. Use the
indicated JSON text file or inline text as input.
{
Accept = application/json
Content-Type = application/json
Content-Length = 2806
}
Response Headers
{
Date = Wed, 03 Dec 2014 20:58:34 GMT
ETag = "0"
Location = https://$vRA/catalog-service/api/consumer/requests/7aaf9baf-aa4e-47c4-997b-edd7c7983a5b
{
$requestObjectDetails
}
Content-Type = application/json;charset=UTF-8
Content-Length = 0
Vary = Accept-Encoding,User-Agent
Keep-Alive = timeout=15, max=100
Connection = Keep-Alive
}
null
Programming Guide
VMware, Inc. 58